Class: A2A::Agent::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/a2a/agent.rb

Overview

Handler object produced by the #on DSL method. Conforms to the Dispatcher contract: #operations, #call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operations:, app:) ⇒ Handler

Returns a new instance of Handler.



112
113
114
115
# File 'lib/a2a/agent.rb', line 112

def initialize(operations:, app:)
  @operations = operations
  @app        = app
end

Instance Attribute Details

#operationsObject (readonly)

Returns the value of attribute operations.



110
111
112
# File 'lib/a2a/agent.rb', line 110

def operations
  @operations
end

Instance Method Details

#call(env) ⇒ Object



117
118
119
# File 'lib/a2a/agent.rb', line 117

def call(env)
  @app.call(env)
end