Class: Shef::NamedDataBagWrapper

Inherits:
ModelWrapper show all
Defined in:
lib/chef/shef/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

#convert_to_class_name, #convert_to_snake_case, #filename_to_qualified_string, #snake_case_basename

Constructor Details

#initialize(databag_name) ⇒ NamedDataBagWrapper

Returns a new instance of NamedDataBagWrapper


97
98
99
# File 'lib/chef/shef/model_wrapper.rb', line 97

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

Instance Method Details

#show(item) ⇒ Object


104
105
106
# File 'lib/chef/shef/model_wrapper.rb', line 104

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