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

Returns:



10
11
12
# File 'lib/toy/lists.rb', line 10

def list?(key)
  lists.keys.include?(key.to_sym)
end

#listsObject



6
7
8
# File 'lib/toy/lists.rb', line 6

def lists
  @lists ||= {}
end