Sha256: 32ffb98088b31aa37cc4ad900bf9282e6d85cfde68eb123f0a3057c06cc06585

Contents?: true

Size: 508 Bytes

Versions: 1

Compression:

Stored size: 508 Bytes

Contents

class Chef
  class Knife
    class PartialSearch
      class FakeNode < Hash
        def name
          self['name']
        end
        def chef_environment
          self['chef_environment']
        end
        def run_list
          self['run_list'].join(', ')
        end

        def [](key)
          super(key.to_s)
        end

        def kind_of?(klass)
          if klass.to_s == 'Chef::Node'
            true
          else
            super
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
knife-partial-search-0.0.2 lib/chef/knife/partial_search/fake_node.rb