Class: Chef::Knife::Scrub::AttributeExtractor::Simple

Inherits:
Base
  • Object
show all
Defined in:
lib/chef/knife/scrub/attribute_extractor.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Chef::Knife::Scrub::AttributeExtractor::Base

Instance Method Details

#delete(path) ⇒ Object



82
83
84
85
# File 'lib/chef/knife/scrub/attribute_extractor.rb', line 82

def delete(path)
  base, key = extract(attributes, path)
  base.delete(key)
end

#fetch(path) ⇒ Object



77
78
79
80
# File 'lib/chef/knife/scrub/attribute_extractor.rb', line 77

def fetch(path)
  base, key = extract(attributes, path)
  base.fetch(key)
end

#has_key?(path) ⇒ Boolean

Returns:

  • (Boolean)


72
73
74
75
# File 'lib/chef/knife/scrub/attribute_extractor.rb', line 72

def has_key?(path)
  base, key = extract(attributes, path)
  !base.nil? && base.has_key?(key)
end