# class Chef::Resource::YumPackage

### Public Class Methods

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

    # File lib/chef/resource/yum_package.rb, line 26
    def initialize(name, run_context=nil)
      super
      @resource_name = :yum_package
      @provider = Chef::Provider::Package::Yum
      @flush_cache = { :before => false, :after => false }
      @allow_downgrade = false
    end

### Public Instance Methods

allow_downgrade(arg=nil) click to toggle source

    # File lib/chef/resource/yum_package.rb, line 53
    def allow_downgrade(arg=nil)
      set_or_return(
        :allow_downgrade,
        arg,
        :kind_of => [ TrueClass, FalseClass ]
      )
    end

arch(arg=nil) click to toggle source

Install a specific arch

    # File lib/chef/resource/yum_package.rb, line 35
    def arch(arg=nil)
      set_or_return(
        :arch,
        arg,
        :kind_of => [ String ]
      )
    end

flush_cache(args={}) click to toggle source

    # File lib/chef/resource/yum_package.rb, line 43
    def flush_cache(args={})
      if args.is_a? Array
        args.each { |arg| @flush_cache[arg] = true }
      elsif args.any?
        @flush_cache = args
      else
        @flush_cache
      end
    end