WpItem::Findable#Found_From rdoc

This commit is contained in:
erwanlr
2013-03-25 13:56:13 +01:00
parent 2ee2fe494d
commit 276952ffb9

View File

@@ -3,6 +3,11 @@
class WpItem
attr_reader :found_from
# Sets the found_from attribute
#
# @param [ String ] method The method which found the WpItem
#
# @return [ void ]
def found_from=(method)
found = method[%r{find_from_(.*)}, 1]
@found_from = found.gsub('_', ' ') if found