Navigation Menu

Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Adding data_bag and data_bag_item helpers to the language - CHEF-708
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhjk committed Nov 25, 2009
1 parent 71623b6 commit 8232fc3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions chef/lib/chef/mixin/language.rb
Expand Up @@ -17,6 +17,8 @@
#

require 'chef/search/query'
require 'chef/data_bag'
require 'chef/data_bag_item'

class Chef
module Mixin
Expand Down Expand Up @@ -79,6 +81,14 @@ def platform?(*args)
def search(*args, &block)
Chef::Search::Query.new.search(*args, &block)
end

def data_bag(bag)
Chef::DataBag.load(bag)
end

def data_bag_item(bag, item)
Chef::DataBagItem.load(bag, item)
end

end
end
Expand Down

0 comments on commit 8232fc3

Please sign in to comment.