# class Chef::Resource::Route

### Public Class Methods

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

    # File lib/chef/resource/route.rb, line 30
    def initialize(name, run_context=nil)
      super
      @resource_name = :route
      @target = name
      @action = [:add]
      @allowed_actions.push(:add, :delete)
      @netmask = nil
      @gateway = nil
      @metric = nil
      @device = nil
      @route_type = :host
      @networking = nil
      @networking_ipv6 = nil
      @hostname = nil
      @domainname = nil
      @domain = nil
    end

### Public Instance Methods

device(arg=nil) click to toggle source

    # File lib/chef/resource/route.rb, line 120
    def device(arg=nil)
      set_or_return(
        :device,
        arg,
        :kind_of => String
      )
    end

domain(arg=nil) click to toggle source

    # File lib/chef/resource/route.rb, line 80
    def domain(arg=nil)
      set_or_return(
        :domain,
        arg,
        :kind_of => String
      )
    end

domainname(arg=nil) click to toggle source

    # File lib/chef/resource/route.rb, line 72
    def domainname(arg=nil)
      set_or_return(
        :domainname,
        arg,
        :kind_of => String
      )
    end

gateway(arg=nil) click to toggle source

    # File lib/chef/resource/route.rb, line 104
    def gateway(arg=nil)
      set_or_return(
        :gateway,
        arg,
        :kind_of => String
      )
    end

hostname(arg=nil) click to toggle source

    # File lib/chef/resource/route.rb, line 64
    def hostname(arg=nil)
      set_or_return(
        :hostname,
        arg,
        :kind_of => String
      )
    end

metric(arg=nil) click to toggle source

    # File lib/chef/resource/route.rb, line 112
    def metric(arg=nil)
      set_or_return(
        :metric,
        arg,
        :kind_of => Integer
      )
    end

netmask(arg=nil) click to toggle source

    # File lib/chef/resource/route.rb, line 96
    def netmask(arg=nil)
      set_or_return(
        :netmask,
        arg,
        :kind_of => String
      )
    end

networking(arg=nil) click to toggle source

    # File lib/chef/resource/route.rb, line 48
    def networking(arg=nil)
      set_or_return(
        :networking,
        arg,
        :kind_of => String
      )
    end

networking_ipv6(arg=nil) click to toggle source

    # File lib/chef/resource/route.rb, line 56
    def networking_ipv6(arg=nil)
      set_or_return(
        :networking_ipv6,
        arg,
        :kind_of => String
      )
    end

route_type(arg=nil) click to toggle source

    # File lib/chef/resource/route.rb, line 128
    def route_type(arg=nil)
      real_arg = arg.kind_of?(String) ? arg.to_sym : arg
      set_or_return(
        :route_type,
        real_arg,
        :equal_to => [ :host, :net ]
      )
    end

target(arg=nil) click to toggle source

    # File lib/chef/resource/route.rb, line 88
    def target(arg=nil)
      set_or_return(
        :target,
        arg,
        :kind_of => String
      )
    end