Class: Chef::Resource::ChefGem
- Defined in:
- lib/chef/resource/chef_gem.rb
Instance Method Summary collapse
- #after_created ⇒ Object
-
#gem_binary(arg = nil) ⇒ Object
The chef_gem resources is for installing gems to the current gem environment only for use by Chef cookbooks.
-
#initialize(name, run_context = nil) ⇒ ChefGem
constructor
A new instance of ChefGem.
Constructor Details
Instance Method Details
#after_created ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'lib/chef/resource/chef_gem.rb', line 43 def after_created # Chef::Resource.run_action: Caveat: this skips Chef::Runner.run_action, where notifications are handled # Action could be an array of symbols, but probably won't (think install + enable for a package) Array(@action).each do |action| self.run_action(action) end Gem.clear_paths end |
#gem_binary(arg = nil) ⇒ Object
The chef_gem resources is for installing gems to the current gem environment only for use by Chef cookbooks.
35 36 37 38 39 40 41 |
# File 'lib/chef/resource/chef_gem.rb', line 35 def gem_binary(arg=nil) if arg raise ArgumentError, "The chef_gem resource is restricted to the current gem environment, use gem_package to install to other environments." end nil end |