Class: A2A::AgentProvider

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#organizationObject (readonly)

Returns the value of attribute organization.



5
6
7
# File 'lib/a2a/agent_provider.rb', line 5

def organization
  @organization
end

#urlObject (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_hObject



16
17
18
# File 'lib/a2a/agent_provider.rb', line 16

def to_h
  { "organization" => organization, "url" => url }
end