Module: SimplyCouch::Model::View::Lists::ClassMethods
- Defined in:
- lib/simply_couch/model/view/lists.rb
Instance Method Summary collapse
Instance Method Details
#list(name, list_function) ⇒ Object
10 11 12 |
# File 'lib/simply_couch/model/view/lists.rb', line 10 def list(name, list_function) lists[name] = list_function end |
#lists(name = nil) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/simply_couch/model/view/lists.rb', line 14 def lists(name = nil) if name.nil? @lists ||= {} else (@lists && @lists[name]) || (superclass.lists(name) if superclass.respond_to?(:lists)) end end |