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.
-
#externally_sandboxed ⇒ Object
Returns the value of attribute externally_sandboxed.
-
#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.
317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/agent_harness/configuration.rb', line 317 def initialize(name) @name = name.to_sym @enabled = true @type = :usage_based @priority = 10 @models = [] @default_flags = [] @timeout = nil @model = nil @externally_sandboxed = false end |
Instance Attribute Details
#default_flags ⇒ Object
Returns the value of attribute default_flags.
312 313 314 |
# File 'lib/agent_harness/configuration.rb', line 312 def default_flags @default_flags end |
#enabled ⇒ Object
Returns the value of attribute enabled.
312 313 314 |
# File 'lib/agent_harness/configuration.rb', line 312 def enabled @enabled end |
#externally_sandboxed ⇒ Object
Returns the value of attribute externally_sandboxed.
312 313 314 |
# File 'lib/agent_harness/configuration.rb', line 312 def externally_sandboxed @externally_sandboxed end |
#model ⇒ Object
Returns the value of attribute model.
312 313 314 |
# File 'lib/agent_harness/configuration.rb', line 312 def model @model end |
#models ⇒ Object
Returns the value of attribute models.
312 313 314 |
# File 'lib/agent_harness/configuration.rb', line 312 def models @models end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
315 316 317 |
# File 'lib/agent_harness/configuration.rb', line 315 def name @name end |
#priority ⇒ Object
Returns the value of attribute priority.
312 313 314 |
# File 'lib/agent_harness/configuration.rb', line 312 def priority @priority end |
#timeout ⇒ Object
Returns the value of attribute timeout.
312 313 314 |
# File 'lib/agent_harness/configuration.rb', line 312 def timeout @timeout end |
#type ⇒ Object
Returns the value of attribute type.
312 313 314 |
# File 'lib/agent_harness/configuration.rb', line 312 def type @type end |
Instance Method Details
#merge!(options) ⇒ self
Merge options into this configuration
333 334 335 336 337 338 339 |
# File 'lib/agent_harness/configuration.rb', line 333 def merge!() .each do |key, value| setter = "#{key}=" send(setter, value) if respond_to?(setter) end self end |