Module: HashedAttributes::InstanceMethods
- Defined in:
- lib/hashed_attributes.rb
Instance Method Summary collapse
- #get_hashed_attribute_for(key) ⇒ Object
- #initialize_hashed_attributes ⇒ Object
- #set_hashed_attribute_for(key, value) ⇒ Object
Instance Method Details
#get_hashed_attribute_for(key) ⇒ Object
34 35 36 |
# File 'lib/hashed_attributes.rb', line 34 def get_hashed_attribute_for(key) self[hashed_attributes_column][key] end |
#initialize_hashed_attributes ⇒ Object
43 44 45 |
# File 'lib/hashed_attributes.rb', line 43 def initialize_hashed_attributes self[hashed_attributes_column] = {} if self[hashed_attributes_column].nil? end |
#set_hashed_attribute_for(key, value) ⇒ Object
38 39 40 41 |
# File 'lib/hashed_attributes.rb', line 38 def set_hashed_attribute_for(key,value) initialize_hashed_attributes self[hashed_attributes_column][key]=value end |