Sha256: 4e04687890bec9be361dc8602e94d38da55992e177079b0a0ff8507d8e5c1379
Contents?: true
Size: 506 Bytes
Versions: 12
Compression:
Stored size: 506 Bytes
Contents
require 'pio/open_flow10/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
12 entries across 12 versions & 1 rubygems