Module: ConfigureMe::AttributeMethods
- Included in:
- Base
- Defined in:
- lib/configure_me/attribute_methods.rb
Instance Method Summary collapse
Instance Method Details
#read_attribute(name) ⇒ Object
26 27 28 29 30 |
# File 'lib/configure_me/attribute_methods.rb', line 26 def read_attribute(name) name_sym = name.to_sym value = attribute_before_type_cast(name) self.class.class_settings[name_sym].convert(value) end |
#write_attribute(name, value) ⇒ Object
32 33 34 35 36 |
# File 'lib/configure_me/attribute_methods.rb', line 32 def write_attribute(name, value) name_sym = name.to_sym make_dirty(name_sym) temp_attributes[name_sym] = value end |