Module: Toy::Lists::ClassMethods
- Defined in:
- lib/toy/lists.rb
Instance Method Summary collapse
Instance Method Details
#list(name, *args, &block) ⇒ Object
32 33 34 |
# File 'lib/toy/lists.rb', line 32 def list(name, *args, &block) List.new(self, name, *args, &block) end |
#list?(key) ⇒ Boolean
10 11 12 |
# File 'lib/toy/lists.rb', line 10 def list?(key) lists.keys.include?(key.to_sym) end |
#lists ⇒ Object
6 7 8 |
# File 'lib/toy/lists.rb', line 6 def lists @lists ||= {} end |