Class: A2A::Agent::Terminal
- Inherits:
-
Object
- Object
- A2A::Agent::Terminal
- Defined in:
- lib/a2a/agent.rb
Overview
Wraps the respond_with lambda as a callable. Returns whatever the lambda returns.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(callable) ⇒ Terminal
constructor
A new instance of Terminal.
Constructor Details
#initialize(callable) ⇒ Terminal
Returns a new instance of Terminal.
98 99 100 |
# File 'lib/a2a/agent.rb', line 98 def initialize(callable) @callable = callable end |
Instance Method Details
#call(env) ⇒ Object
102 103 104 |
# File 'lib/a2a/agent.rb', line 102 def call(env) @callable.call(env) end |