Class: XAeonAgents::AgentOptions
- Inherits:
-
Object
- Object
- XAeonAgents::AgentOptions
- Defined in:
- lib/x_aeon_agents/agent_options.rb
Overview
Provide agent options for different agent categories
Public API collapse
-
#[](agent_category) ⇒ Hash{Symbol => Object}?
Get an agent's option for a given agent category.
-
#[]=(agent_category, agent_options) ⇒ Object
Set an agent's option for a given agent category.
Instance Method Details
#[](agent_category) ⇒ Hash{Symbol => Object}?
Get an agent's option for a given agent category. Those options can be given directly to the agent's constructor to tune it for the desired category.
11 12 13 14 15 |
# File 'lib/x_aeon_agents/agent_options.rb', line 11 def [](agent_category) # Lazy-evaluate it if needed [agent_category] = [agent_category].call if [agent_category].is_a?(Proc) [agent_category] end |
#[]=(agent_category, agent_options) ⇒ Object
Set an agent's option for a given agent category.
21 22 23 |
# File 'lib/x_aeon_agents/agent_options.rb', line 21 def []=(agent_category, ) [agent_category] = end |