class Chef::Resource::Package
Public Class Methods
new(name, run_context=nil)
click to toggle source
Calls superclass method
Chef::Resource.new
# File lib/chef/resource/package.rb, line 30 def initialize(name, run_context=nil) super @action = :install @allowed_actions.push(:install, :upgrade, :remove, :purge, :reconfig) @candidate_version = nil @options = nil @package_name = name @resource_name = :package @response_file = nil @response_file_variables = Hash.new @source = nil @version = nil @timeout = 900 end
Public Instance Methods
options(arg=nil)
click to toggle source
# File lib/chef/resource/package.rb, line 85 def options(arg=nil) set_or_return( :options, arg, :kind_of => [ String ] ) end
package_name(arg=nil)
click to toggle source
# File lib/chef/resource/package.rb, line 45 def package_name(arg=nil) set_or_return( :package_name, arg, :kind_of => [ String ] ) end
response_file(arg=nil)
click to toggle source
# File lib/chef/resource/package.rb, line 61 def response_file(arg=nil) set_or_return( :response_file, arg, :kind_of => [ String ] ) end
response_file_variables(arg=nil)
click to toggle source
# File lib/chef/resource/package.rb, line 69 def response_file_variables(arg=nil) set_or_return( :response_file_variables, arg, :kind_of => [ Hash ] ) end
source(arg=nil)
click to toggle source
# File lib/chef/resource/package.rb, line 77 def source(arg=nil) set_or_return( :source, arg, :kind_of => [ String ] ) end
timeout(arg=nil)
click to toggle source
# File lib/chef/resource/package.rb, line 93 def timeout(arg=nil) set_or_return( :timeout, arg, :kind_of => [String, Integer] ) end
version(arg=nil)
click to toggle source
# File lib/chef/resource/package.rb, line 53 def version(arg=nil) set_or_return( :version, arg, :kind_of => [ String ] ) end