Class: Shell::NamedDataBagWrapper
- Inherits:
-
ModelWrapper
- Object
- ModelWrapper
- Shell::NamedDataBagWrapper
- Defined in:
- lib/chef/shell/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
#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 |