Class: Hash
- Defined in:
- lib/orange-core/magick.rb,
lib/orange-core/magick.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#with_defaults(defaults) ⇒ Object
:nodoc:
18 19 20 |
# File 'lib/orange-core/magick.rb', line 18 def with_defaults(defaults) self.merge(defaults){ |key, old, new| old.nil? ? new : old } end |
#with_defaults!(defaults) ⇒ Object
21 22 23 |
# File 'lib/orange-core/magick.rb', line 21 def with_defaults!(defaults) self.merge!(defaults){ |key, old, new| old.nil? ? new : old } end |