Module: Changi::FlexibleAttributes
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
23 24 25 |
# File 'lib/changi/flexible_attributes.rb', line 23 def self.included base base.extend ClassMethods end |
Instance Method Details
#read_in_attributes ⇒ Object
27 28 29 30 31 |
# File 'lib/changi/flexible_attributes.rb', line 27 def read_in_attributes self.class.attributes.each do |data| send "#{data[:name]}=".to_sym, data[:reader].call(data, self) end end |