class Pio::OpenFlow10::SetVlanVid
An action to modify the VLAN ID of a packet.
Public Class Methods
new(number)
click to toggle source
Calls superclass method
Pio::OpenFlow::Action::new
# File lib/pio/open_flow10/set_vlan_vid.rb, line 14 def initialize(number) vlan_id = number.to_i unless vlan_id >= 1 && vlan_id <= 4095 raise ArgumentError, 'VLAN ID must be between 1 and 4095 inclusive' end super(vlan_id: vlan_id) rescue NoMethodError raise TypeError, 'VLAN ID must be an Integer.' end