Module: DHS::Record::Merge
- Extended by:
- ActiveSupport::Concern
- Included in:
- DHS::Record
- Defined in:
- lib/dhs/concerns/record/merge.rb
Instance Method Summary collapse
- #deep_merge(other) ⇒ Object
- #deep_merge!(other) ⇒ Object
- #merge(other) ⇒ Object
- #merge!(other) ⇒ Object
Instance Method Details
#deep_merge(other) ⇒ Object
18 19 20 |
# File 'lib/dhs/concerns/record/merge.rb', line 18 def deep_merge(other) _record.new(_data.to_h.deep_merge(other.to_h)) end |
#deep_merge!(other) ⇒ Object
22 23 24 |
# File 'lib/dhs/concerns/record/merge.rb', line 22 def deep_merge!(other) _data._raw.deep_merge!(other.to_h) end |
#merge(other) ⇒ Object
10 11 12 |
# File 'lib/dhs/concerns/record/merge.rb', line 10 def merge(other) _record.new(_data.to_h.merge(other.to_h)) end |
#merge!(other) ⇒ Object
14 15 16 |
# File 'lib/dhs/concerns/record/merge.rb', line 14 def merge!(other) _data._raw.merge!(other.to_h) end |