Class: DiviningRod::Mash
- Inherits:
-
Hash
- Object
- Hash
- DiviningRod::Mash
- Defined in:
- lib/divining_rod/mash.rb
Instance Method Summary collapse
-
#initialize(hsh = {}) ⇒ Mash
constructor
A new instance of Mash.
- #merge(opts) ⇒ Object
Constructor Details
#initialize(hsh = {}) ⇒ Mash
Returns a new instance of Mash.
4 5 6 |
# File 'lib/divining_rod/mash.rb', line 4 def initialize(hsh = {}) self.replace(hsh || {}) end |
Instance Method Details
#merge(opts) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/divining_rod/mash.rb', line 8 def merge(opts) opts = opts.dup if self[:tags] || opts[:tags] = Array(self[:tags]) | Array(opts[:tags]) opts[:tags] = end super(opts) end |