Class: Shef::NamedDataBagWrapper
- Inherits:
-
ModelWrapper
- Object
- ModelWrapper
- Shef::NamedDataBagWrapper
- Defined in:
- lib/chef/shef/model_wrapper.rb
Instance Attribute Summary
Attributes inherited from ModelWrapper
Instance Method Summary collapse
-
#initialize(databag_name) ⇒ NamedDataBagWrapper
constructor
A new instance of NamedDataBagWrapper.
- #show(item) ⇒ Object
Methods inherited from ModelWrapper
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 |