class Pio::OpenFlow10::SendOutPort
An action to output a packet to a port.
Public Class Methods
new(user_options)
click to toggle source
rubocop:disable MethodLength
Calls superclass method
Pio::OpenFlow::Action::new
# File lib/pio/open_flow10/send_out_port.rb, line 16 def initialize(user_options) options = if user_options.respond_to?(:to_i) { port: user_options.to_i } elsif Port16.reserved_port_name?(user_options) { port: user_options } else user_options end max_length = options[:max_length] if max_length && !max_length.unsigned_16bit? raise(ArgumentError, 'The max_length should be an unsigned 16bit integer.') end super(options) end
Public Instance Methods
==(other)
click to toggle source
rubocop:enable MethodLength
# File lib/pio/open_flow10/send_out_port.rb, line 33 def ==(other) return false unless other to_binary == other.to_binary end