Class: ListParent::MyListType

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#list_hashObject

  • this is for convenience methods in Rails



26
27
28
# File 'lib/listly/backup_lists.rb', line 26

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



39
40
41
# File 'lib/listly/backup_lists.rb', line 39

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

#[]=(key, value) ⇒ Object



43
44
45
# File 'lib/listly/backup_lists.rb', line 43

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