Class: Shell::NamedDataBagWrapper

Inherits:
ModelWrapper show all
Defined in:
lib/chef/shell/model_wrapper.rb

Instance Attribute Summary

Attributes inherited from ModelWrapper

#model_symbol

Instance Method Summary collapse

Methods inherited from ModelWrapper

#all, #search, #transform

Methods included from Chef::Mixin::ConvertToClassName

#constantize, #convert_to_class_name, #convert_to_snake_case, #filename_to_qualified_string, #normalize_snake_case_name, #snake_case_basename

Constructor Details

#initialize(databag_name) ⇒ NamedDataBagWrapper

Returns a new instance of NamedDataBagWrapper.



99
100
101
# File 'lib/chef/shell/model_wrapper.rb', line 99

def initialize(databag_name)
  @model_symbol = @databag_name = databag_name
end

Instance Method Details

#show(item) ⇒ Object



105
106
107
# File 'lib/chef/shell/model_wrapper.rb', line 105

def show(item)
  Chef::DataBagItem.load(@databag_name, item)
end