Class: AgentHarness::ProviderConfig
- Inherits:
-
Object
- Object
- AgentHarness::ProviderConfig
- Defined in:
- lib/agent_harness/configuration.rb
Overview
Provider-specific configuration
Instance Attribute Summary collapse
-
#default_flags ⇒ Object
Returns the value of attribute default_flags.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#model ⇒ Object
Returns the value of attribute model.
-
#models ⇒ Object
Returns the value of attribute models.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name) ⇒ ProviderConfig
constructor
A new instance of ProviderConfig.
-
#merge!(options) ⇒ self
Merge options into this configuration.
Constructor Details
#initialize(name) ⇒ ProviderConfig
Returns a new instance of ProviderConfig.
239 240 241 242 243 244 245 246 247 248 |
# File 'lib/agent_harness/configuration.rb', line 239 def initialize(name) @name = name.to_sym @enabled = true @type = :usage_based @priority = 10 @models = [] @default_flags = [] @timeout = nil @model = nil end |
Instance Attribute Details
#default_flags ⇒ Object
Returns the value of attribute default_flags.
235 236 237 |
# File 'lib/agent_harness/configuration.rb', line 235 def default_flags @default_flags end |
#enabled ⇒ Object
Returns the value of attribute enabled.
235 236 237 |
# File 'lib/agent_harness/configuration.rb', line 235 def enabled @enabled end |
#model ⇒ Object
Returns the value of attribute model.
235 236 237 |
# File 'lib/agent_harness/configuration.rb', line 235 def model @model end |
#models ⇒ Object
Returns the value of attribute models.
235 236 237 |
# File 'lib/agent_harness/configuration.rb', line 235 def models @models end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
237 238 239 |
# File 'lib/agent_harness/configuration.rb', line 237 def name @name end |
#priority ⇒ Object
Returns the value of attribute priority.
235 236 237 |
# File 'lib/agent_harness/configuration.rb', line 235 def priority @priority end |
#timeout ⇒ Object
Returns the value of attribute timeout.
235 236 237 |
# File 'lib/agent_harness/configuration.rb', line 235 def timeout @timeout end |
#type ⇒ Object
Returns the value of attribute type.
235 236 237 |
# File 'lib/agent_harness/configuration.rb', line 235 def type @type end |
Instance Method Details
#merge!(options) ⇒ self
Merge options into this configuration
254 255 256 257 258 259 260 |
# File 'lib/agent_harness/configuration.rb', line 254 def merge!() .each do |key, value| setter = "#{key}=" send(setter, value) if respond_to?(setter) end self end |