Module: ConfigureMe::AttributeMethods

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/configure_me/attribute_methods.rb

Defined Under Namespace

Modules: OverriddenClassMethods

Instance Method Summary collapse

Instance Method Details

#read_attribute(name) ⇒ Object



29
30
31
32
33
# File 'lib/configure_me/attribute_methods.rb', line 29

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



35
36
37
38
39
# File 'lib/configure_me/attribute_methods.rb', line 35

def write_attribute(name, value)
  name_sym = name.to_sym
  make_dirty(name_sym)
  temp_attributes[name_sym] = value
end