Sha256: 3459a7b52e17e8ad1255edb1233c087438722201033711babe7c5af37608dee4
Contents?: true
Size: 656 Bytes
Versions: 4
Compression:
Stored size: 656 Bytes
Contents
module Net module IP # Class for working with ip rules. class Rule # Create a new rule object # @example Create a rule to use a different route table # Net::IP::Rule.new(:to => '1.2.3.4', :table => 'custom') # @note This does NOT add the entry to the ip rules. See {Rule::Collection#add} for creating new rules in the ip rule list. # @param params {Hash} def initialize(params = {}) params.each do |k,v| instance_variable_set("@#{k}", v) end end def to_params str = "" str << "priority #{@priority} " if @priority str end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
net-ip-0.0.8 | lib/net/ip/rule.rb |
net-ip-0.0.7 | lib/net/ip/rule.rb |
net-ip-0.0.6 | lib/net/ip/rule.rb |
net-ip-0.0.5 | lib/net/ip/rule.rb |