Class: SimpleAcp::Models::AgentListResponse
- Defined in:
- lib/simple_acp/models/agent_manifest.rb
Overview
Response for listing agents
Class Method Summary collapse
Methods inherited from Base
#==, attribute, attributes, #hash, #initialize, own_attributes, #to_h, #to_json
Constructor Details
This class inherits a constructor from SimpleAcp::Models::Base
Class Method Details
.from_hash(hash) ⇒ Object
117 118 119 120 121 122 123 124 125 126 |
# File 'lib/simple_acp/models/agent_manifest.rb', line 117 def self.from_hash(hash) return nil if hash.nil? instance = super agents_data = hash["agents"] || hash[:agents] || [] instance.agents = agents_data.map { |a| AgentManifest.from_hash(a) } instance end |