class Instruction
Class representing OpenFlow flow instruction
Attributes
order[RW]
integer : order that action is to be carried out relative to other instructions.
Public Class Methods
new(instruction_order: nil)
click to toggle source
Parameters
instruction_order
-
Order in which to carry out this instruction relative to other instructions.
# File lib/openflowdev/instruction.rb, line 41 def initialize(instruction_order: nil) raise ArgumentError, "Instruction Order (instruction_order) required" unless instruction_order @order = instruction_order @actions = [] end
Public Instance Methods
add_apply_action(action)
click to toggle source
Add action to an Instruction.
Parameters
action
-
Action : What action to take
# File lib/openflowdev/instruction.rb, line 52 def add_apply_action(action) raise ArgumentError, "Action must be a subclass of 'Action'" unless action.is_a?(Action) @actions << action end