Class: CortexClient::Http::Agent
- Inherits:
-
Object
- Object
- CortexClient::Http::Agent
- Defined in:
- lib/cortex_client/http/agent.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, version:) ⇒ Agent
constructor
A new instance of Agent.
- #to_s ⇒ Object
Constructor Details
#initialize(name:, version:) ⇒ Agent
Returns a new instance of Agent.
6 7 8 9 |
# File 'lib/cortex_client/http/agent.rb', line 6 def initialize(name:, version:) @name = name @version = version end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/cortex_client/http/agent.rb', line 4 def name @name end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
4 5 6 |
# File 'lib/cortex_client/http/agent.rb', line 4 def version @version end |
Class Method Details
.list_to_s(agents) ⇒ Object
11 12 13 |
# File 'lib/cortex_client/http/agent.rb', line 11 def self.list_to_s(agents) agents.collect(&:to_s).join(" ") end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/cortex_client/http/agent.rb', line 15 def to_s "#{name}/#{version}".freeze end |