Class: Logux::Process::Auth

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

Constant Summary collapse

AUTHENTICATED =
'authenticated'
DENIED =
'denied'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stream:, chunk:) ⇒ Auth

Returns a new instance of Auth.



8
9
10
11
# File 'lib/logux/process/auth.rb', line 8

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/auth.rb', line 6

def chunk
  @chunk
end

#streamObject (readonly)

Returns the value of attribute stream.



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

def stream
  @stream
end

Instance Method Details

#callObject



13
14
15
# File 'lib/logux/process/auth.rb', line 13

def call
  stream.write([auth_result, chunk.auth_id])
end