Class: Logux::Process::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/logux/process/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#chunkObject (readonly)

Returns the value of attribute chunk.



6
7
8
# File 'lib/logux/process/action.rb', line 6

def chunk
  @chunk
end

#stop_processObject

Returns the value of attribute stop_process.



7
8
9
# File 'lib/logux/process/action.rb', line 7

def stop_process
  @stop_process
end

#streamObject (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_chunkObject



19
20
21
# File 'lib/logux/process/action.rb', line 19

def action_from_chunk
  @action_from_chunk ||= chunk[:action]
end

#callObject



14
15
16
17
# File 'lib/logux/process/action.rb', line 14

def call
  process_authorization!
  process_action!
end

#meta_from_chunkObject



23
24
25
# File 'lib/logux/process/action.rb', line 23

def meta_from_chunk
  @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

Returns:

  • (Boolean)


27
28
29
# File 'lib/logux/process/action.rb', line 27

def stop_process?
  @stop_process ||= false
end