Class: Logux::Process::Action
- Inherits:
-
Object
- Object
- Logux::Process::Action
- Defined in:
- lib/logux/process/action.rb
Instance Attribute Summary collapse
-
#chunk ⇒ Object
readonly
Returns the value of attribute chunk.
-
#stop_process ⇒ Object
Returns the value of attribute stop_process.
-
#stream ⇒ Object
readonly
Returns the value of attribute stream.
Instance Method Summary collapse
- #action_from_chunk ⇒ Object
- #call ⇒ Object
-
#initialize(stream:, chunk:) ⇒ Action
constructor
A new instance of Action.
- #meta_from_chunk ⇒ Object
- #stop_process! ⇒ Object
- #stop_process? ⇒ Boolean
Constructor Details
#initialize(stream:, chunk:) ⇒ Action
Returns a new instance of Action.
9 10 11 12 |
# File 'lib/logux/process/action.rb', line 9 def initialize(stream:, chunk:) @stream = stream @chunk = chunk end |
Instance Attribute Details
#chunk ⇒ Object (readonly)
Returns the value of attribute chunk.
6 7 8 |
# File 'lib/logux/process/action.rb', line 6 def chunk @chunk end |
#stop_process ⇒ Object
Returns the value of attribute stop_process.
7 8 9 |
# File 'lib/logux/process/action.rb', line 7 def stop_process @stop_process end |
#stream ⇒ Object (readonly)
Returns the value of attribute stream.
6 7 8 |
# File 'lib/logux/process/action.rb', line 6 def stream @stream end |
Instance Method Details
#action_from_chunk ⇒ Object
19 20 21 |
# File 'lib/logux/process/action.rb', line 19 def action_from_chunk @action_from_chunk ||= chunk[:action] end |
#call ⇒ Object
14 15 16 17 |
# File 'lib/logux/process/action.rb', line 14 def call process_action! end |
#meta_from_chunk ⇒ Object
23 24 25 |
# File 'lib/logux/process/action.rb', line 23 def @meta_from_chunk ||= chunk[:meta] end |
#stop_process! ⇒ Object
31 32 33 |
# File 'lib/logux/process/action.rb', line 31 def stop_process! @stop_process = true end |
#stop_process? ⇒ Boolean
27 28 29 |
# File 'lib/logux/process/action.rb', line 27 def stop_process? @stop_process ||= false end |