Class: Listly::BaseList::MyListType

Inherits:
Object
  • Object
show all
Defined in:
lib/listly/base_list.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#list_hashObject

  • this is for convenience methods in Rails



28
29
30
# File 'lib/listly/base_list.rb', line 28

def list_hash
  @list_hash
end

Instance Method Details

#[](key) ⇒ Object

  • these are for convenience methods in Rails i.e. make lists behave like AR objects



44
45
46
# File 'lib/listly/base_list.rb', line 44

def [](key)
  list_hash[key.to_s]
end

#[]=(key, value) ⇒ Object



48
49
50
# File 'lib/listly/base_list.rb', line 48

def []=(key, value)
  list_hash[key.to_s] = value
end