Method: Arrow::Config::ConfigStruct#merge!
- Defined in:
- lib/arrow/config.rb
#merge!(other) ⇒ Object
Merge the specified other object with this config struct. The other object can be either a Hash, another ConfigStruct, or an Arrow::Config.
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 |
# File 'lib/arrow/config.rb', line 486 def merge!( other ) case other when Hash @hash = self.to_h.merge( other, &HashMergeFunction ) when ConfigStruct @hash = self.to_h.merge( other.to_h, &HashMergeFunction ) when Arrow::Config @hash = self.to_h.merge( other.struct.to_h, &HashMergeFunction ) else raise TypeError, "Don't know how to merge with a %p" % other.class end # :TODO: Actually check to see if anything has changed? @dirty = true return self end |