lib/chef/knife/partial_search/fake_node.rb in knife-partial-search-0.0.2 vs lib/chef/knife/partial_search/fake_node.rb in knife-partial-search-0.0.3
- old
+ new
@@ -1,28 +1,26 @@
-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
+module 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 [](key)
+ super(key.to_s)
+ end
- def kind_of?(klass)
- if klass.to_s == 'Chef::Node'
- true
- else
- super
- end
+ def kind_of?(klass)
+ if klass.to_s == 'Chef::Node'
+ true
+ else
+ super
end
end
end
end
end