Sha256: 756afc266ebc9074f9601b74ece980998be9da527ffbe5265ab3dae5a38ddcd3

Contents?: true

Size: 496 Bytes

Versions: 18

Compression:

Stored size: 496 Bytes

Contents

require 'itamae'
require 'hashie'
require 'json'

module Itamae
  class Node < Hashie::Mash
    def reverse_merge(other_hash)
      Hashie::Mash.new(other_hash).merge(self)
    end

    def reverse_merge!(other_hash)
      self.replace(reverse_merge(other_hash))
    end

    def [](key)
      val = super(key)
      if val.nil?
        begin
          val = host_inventory[key]
        rescue NotImplementedError, NameError
          val = nil
        end
      end
      val
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
itamae-1.1.22 lib/itamae/node.rb
itamae-1.1.21 lib/itamae/node.rb
itamae-1.1.20 lib/itamae/node.rb
itamae-1.1.19 lib/itamae/node.rb
itamae-1.1.18 lib/itamae/node.rb
itamae-1.1.17 lib/itamae/node.rb
itamae-1.1.16 lib/itamae/node.rb
itamae-1.1.15 lib/itamae/node.rb
itamae-1.1.14 lib/itamae/node.rb
itamae-1.1.13 lib/itamae/node.rb
itamae-1.1.12 lib/itamae/node.rb
itamae-1.1.11 lib/itamae/node.rb
itamae-1.1.10 lib/itamae/node.rb
itamae-1.1.9 lib/itamae/node.rb
itamae-1.1.8 lib/itamae/node.rb
itamae-1.1.7 lib/itamae/node.rb
itamae-1.1.5 lib/itamae/node.rb
itamae-1.1.4 lib/itamae/node.rb