Class: SolidFlow::Wait::Instruction

Inherits:
Object
  • Object
show all
Defined in:
lib/solid_flow/wait.rb

Direct Known Subclasses

SignalInstruction, TimerInstruction

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, options) ⇒ Instruction

Returns a new instance of Instruction.



8
9
10
11
# File 'lib/solid_flow/wait.rb', line 8

def initialize(type, options)
  @type = type
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/solid_flow/wait.rb', line 6

def options
  @options
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/solid_flow/wait.rb', line 6

def type
  @type
end

Instance Method Details

#to_hObject



13
14
15
# File 'lib/solid_flow/wait.rb', line 13

def to_h
  { type:, options: options }
end