New enumeration system
This commit is contained in:
15
lib/common/models/wp_item/findable.rb
Executable file
15
lib/common/models/wp_item/findable.rb
Executable file
@@ -0,0 +1,15 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
class WpItem
|
||||
attr_reader :found_from
|
||||
|
||||
#def allowed_options; super << :found_from end
|
||||
|
||||
def found_from=(method)
|
||||
@found_from = method[%r{find_from_(.*)}, 1].gsub('_', ' ')
|
||||
end
|
||||
|
||||
module Findable
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user