Class: Pio::VendorAction

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/pio/open_flow10/vendor_action.rb

Overview

Vendor defined action

Defined Under Namespace

Classes: Format

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vendor) ⇒ VendorAction

Returns a new instance of VendorAction.



29
30
31
# File 'lib/pio/open_flow10/vendor_action.rb', line 29

def initialize(vendor)
  @format = Format.new(vendor: vendor)
end

Class Method Details

.read(raw_data) ⇒ Object



16
17
18
19
20
# File 'lib/pio/open_flow10/vendor_action.rb', line 16

def self.read(raw_data)
  allocate.tap do |strip_vlan|
    strip_vlan.instance_variable_set :@format, Format.read(raw_data)
  end
end