Module: Chef::DataRegion::DataQuery
- Defined in:
- lib/chef/data_region.rb
Overview
DataQuery module
This module borrows its name from Chef::DSL::DataQuery, which defines the ‘data_bag_item` method. It exists for mixing in to Recipe, as occurs with Chef::DSL::DataQuery. This is the means by which `data_bag_item` is available in Chef recipes without qualification.
Instance Method Summary collapse
-
#data_bag_item(bag, item, secret = nil) ⇒ Chef::DataBagItem
Fetch the specified item from the specified bag.
Instance Method Details
#data_bag_item(bag, item, secret = nil) ⇒ Chef::DataBagItem
Fetch the specified item from the specified bag
39 40 41 42 |
# File 'lib/chef/data_region.rb', line 39 def data_bag_item(bag, item, secret = nil) loaded_item = Chef::DataBagItem.load((bag), item) encrypted?(loaded_item) ? decrypt(loaded_item) : loaded_item end |