more advanced version detection

This commit is contained in:
Christian Mehlmauer
2016-05-31 14:51:09 +02:00
parent 5118c68f45
commit 0243522854
4 changed files with 17 additions and 5 deletions

View File

@@ -9,8 +9,7 @@ class WpItem
#
# @return [ void ]
def found_from=(method)
found = method[%r{find_from_(.*)}, 1]
@found_from = found.gsub('_', ' ') if found
@found_from = method.to_s.to_s.gsub(/find_from_/, '').gsub(/_/, ' ')
end
module Findable