Sha256: 66ece61b3f93c47c13784b01fd2fd579b1db59fa4fe09c26c1fba448a4950e14
Contents?: true
Size: 494 Bytes
Versions: 20
Compression:
Stored size: 494 Bytes
Contents
require 'pio/set_vlan' module Pio # An action to modify the VLAN priority of a packet. class SetVlanPriority < SetVlan def_format :vlan_priority, 2 def initialize(number) priority = number.to_i if priority < 0 || priority > 7 fail ArgumentError, 'VLAN priority must be between 0 and 7 inclusive' end @format = Format.new(vlan_priority: priority) rescue NoMethodError raise TypeError, 'VLAN priority must be an Integer.' end end end
Version data entries
20 entries across 20 versions & 1 rubygems