Class: A2A::Agent::Handler
- Inherits:
-
Object
- Object
- A2A::Agent::Handler
- 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
-
#operations ⇒ Object
readonly
Returns the value of attribute operations.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(operations:, app:) ⇒ Handler
constructor
A new instance of Handler.
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
#operations ⇒ Object (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 |