Sha256: 95114b7c002bf1888377685a9e4314792cb3a383f2dcb3dd6616380bcd945490

Contents?: true

Size: 404 Bytes

Versions: 5

Compression:

Stored size: 404 Bytes

Contents

module DiviningRod
  module Murge

    # This is tacky, but I'm preserving tags in the option hash
    # and only want to have to write this once
    #
    def murge(old_opts, new_opts)
      old_opts = old_opts || {}
      new_opts = new_opts || {}
      tags = Array(old_opts[:tags]) | Array(new_opts[:tags])
      opts = old_opts.merge(new_opts)
      opts[:tags] = tags
      opts
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
divining_rod-0.6.4 lib/divining_rod/murge.rb
divining_rod-0.6.3 lib/divining_rod/murge.rb
divining_rod-0.6.2 lib/divining_rod/murge.rb
divining_rod-0.6.1 lib/divining_rod/murge.rb
divining_rod-0.6.0 lib/divining_rod/murge.rb