Method: Blacklight::NestedOpenStructWithHashAccess#merge
- Defined in:
- lib/blacklight/nested_open_struct_with_hash_access.rb
#merge(other_hash) ⇒ OpenStructWithHashAccess
Merge the values of this OpenStruct with another OpenStruct or Hash
75 76 77 |
# File 'lib/blacklight/nested_open_struct_with_hash_access.rb', line 75 def merge other_hash self.class.new nested_class, to_h.merge((other_hash if other_hash.is_a? Hash) || other_hash.to_h) end |