Module: ActiveHash::ARApi::Init
- Included in:
- ActiveMocker::ActiveHash::ARApi
- Defined in:
- lib/active_hash/init.rb
Instance Attribute Summary collapse
-
#associations ⇒ Object
readonly
Returns the value of attribute associations.
Instance Method Summary collapse
Instance Attribute Details
#associations ⇒ Object (readonly)
Returns the value of attribute associations.
8 9 10 |
# File 'lib/active_hash/init.rb', line 8 def associations @associations end |
Instance Method Details
#initialize(attributes = {}) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/active_hash/init.rb', line 10 def initialize(attributes = {}) filter_associations(HashWithIndifferentAccess.new(attributes)) @attributes.dup.merge(@associations.dup).each do |key, value| send "#{key}=", value end end |