Class: A2A::AgentProvider
- Inherits:
-
Object
- Object
- A2A::AgentProvider
- Defined in:
- lib/a2a/agent_provider.rb
Instance Attribute Summary collapse
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(organization:, url:) ⇒ AgentProvider
constructor
A new instance of AgentProvider.
- #to_h ⇒ Object
Constructor Details
#initialize(organization:, url:) ⇒ AgentProvider
Returns a new instance of AgentProvider.
7 8 9 10 |
# File 'lib/a2a/agent_provider.rb', line 7 def initialize(organization:, url:) @organization = organization @url = url end |
Instance Attribute Details
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
5 6 7 |
# File 'lib/a2a/agent_provider.rb', line 5 def organization @organization end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
5 6 7 |
# File 'lib/a2a/agent_provider.rb', line 5 def url @url end |
Class Method Details
.from_h(hash) ⇒ Object
12 13 14 |
# File 'lib/a2a/agent_provider.rb', line 12 def self.from_h(hash) new(organization: hash.fetch("organization"), url: hash.fetch("url")) end |
Instance Method Details
#to_h ⇒ Object
16 17 18 |
# File 'lib/a2a/agent_provider.rb', line 16 def to_h { "organization" => organization, "url" => url } end |