Sha256: fe1fc07a86d84bdf12a3c52b85a0b9df1ae5d92e9d3a92daf614aee2307d6e3d

Contents?: true

Size: 298 Bytes

Versions: 2

Compression:

Stored size: 298 Bytes

Contents

module DiviningRod
  class Mash < Hash

    def initialize(hsh = {})
      self.replace(hsh || {})
    end

    def merge(opts = {})
      if self[:tags] || opts[:tags]
        tags = Array(self[:tags]) | Array(opts[:tags])
        opts[:tags] = tags
      end
      super(opts)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
divining_rod-0.6.1 lib/divining_rod/mash.rb
divining_rod-0.6.0 lib/divining_rod/mash.rb