# class Chef::Resource::GemPackage

### Public Class Methods

new(name, run_context=nil) click to toggle source
Calls superclass method Chef::Resource::Package.new

    # File lib/chef/resource/gem_package.rb, line 25
    def initialize(name, run_context=nil)
      super
      @resource_name = :gem_package
      @provider = Chef::Provider::Package::Rubygems
    end

### Public Instance Methods

gem_binary(gem_cmd=nil) click to toggle source

Sets a custom #gem_binary to run for gem commands.

    # File lib/chef/resource/gem_package.rb, line 36
    def gem_binary(gem_cmd=nil)
      set_or_return(:gem_binary,gem_cmd,:kind_of => [ String ])
    end

options(opts=nil) click to toggle source

Options for the gem install, either a Hash or a String. When a hash is given, the options are passed to Gem::DependencyInstaller.new, and the gem will be installed via the gems API. When a String is given, the gem will be installed by shelling out to the gem command. Using a Hash of options with an explicit #gem_binary will result in undefined behavior.

    # File lib/chef/resource/gem_package.rb, line 46
    def options(opts=nil)
      set_or_return(:options,opts,:kind_of => [String,Hash])
    end

source(arg=nil) click to toggle source

    # File lib/chef/resource/gem_package.rb, line 31
    def source(arg=nil)
      set_or_return(:source, arg, :kind_of => [ String, Array ])
    end