Class: ActiveAny::Relation::HashMerger
- Inherits:
-
Object
- Object
- ActiveAny::Relation::HashMerger
- Defined in:
- lib/active_any/relation/merger.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#relation ⇒ Object
readonly
Returns the value of attribute relation.
Instance Method Summary collapse
-
#initialize(relation, hash) ⇒ HashMerger
constructor
A new instance of HashMerger.
- #merge ⇒ Object
- #other ⇒ Object
Constructor Details
#initialize(relation, hash) ⇒ HashMerger
Returns a new instance of HashMerger.
8 9 10 11 12 13 |
# File 'lib/active_any/relation/merger.rb', line 8 def initialize(relation, hash) hash.assert_valid_keys(*Relation::VALUE_METHODS) @relation = relation @hash = hash end |
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
6 7 8 |
# File 'lib/active_any/relation/merger.rb', line 6 def hash @hash end |
#relation ⇒ Object (readonly)
Returns the value of attribute relation.
6 7 8 |
# File 'lib/active_any/relation/merger.rb', line 6 def relation @relation end |