Class: Phronomy::Agent::ContextPlan
- Inherits:
-
Data
- Object
- Data
- Phronomy::Agent::ContextPlan
- Defined in:
- lib/phronomy/agent/context_plan.rb
Instance Attribute Summary collapse
-
#derived_contents ⇒ Object
readonly
Returns the value of attribute derived_contents.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#ordering_hints ⇒ Object
readonly
Returns the value of attribute ordering_hints.
-
#policy_descriptor ⇒ Object
readonly
Returns the value of attribute policy_descriptor.
-
#selected_tool_ids ⇒ Object
readonly
Returns the value of attribute selected_tool_ids.
-
#selected_unit_ids ⇒ Object
readonly
Returns the value of attribute selected_unit_ids.
Instance Method Summary collapse
-
#initialize(**values) ⇒ ContextPlan
constructor
A new instance of ContextPlan.
Constructor Details
#initialize(**values) ⇒ ContextPlan
Returns a new instance of ContextPlan.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/phronomy/agent/context_plan.rb', line 13 def initialize(**values) super(**values.merge( selected_unit_ids: Array(values[:selected_unit_ids]).map(&:to_s).freeze, derived_contents: Array(values[:derived_contents]).freeze, selected_tool_ids: Array(values[:selected_tool_ids]).map(&:to_s).freeze, ordering_hints: Immutable.copy(values[:ordering_hints] || {}), metadata: Immutable.copy(values[:metadata] || {}) )) freeze end |
Instance Attribute Details
#derived_contents ⇒ Object (readonly)
Returns the value of attribute derived_contents
5 6 7 |
# File 'lib/phronomy/agent/context_plan.rb', line 5 def derived_contents @derived_contents end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata
5 6 7 |
# File 'lib/phronomy/agent/context_plan.rb', line 5 def @metadata end |
#ordering_hints ⇒ Object (readonly)
Returns the value of attribute ordering_hints
5 6 7 |
# File 'lib/phronomy/agent/context_plan.rb', line 5 def ordering_hints @ordering_hints end |
#policy_descriptor ⇒ Object (readonly)
Returns the value of attribute policy_descriptor
5 6 7 |
# File 'lib/phronomy/agent/context_plan.rb', line 5 def policy_descriptor @policy_descriptor end |
#selected_tool_ids ⇒ Object (readonly)
Returns the value of attribute selected_tool_ids
5 6 7 |
# File 'lib/phronomy/agent/context_plan.rb', line 5 def selected_tool_ids @selected_tool_ids end |
#selected_unit_ids ⇒ Object (readonly)
Returns the value of attribute selected_unit_ids
5 6 7 |
# File 'lib/phronomy/agent/context_plan.rb', line 5 def selected_unit_ids @selected_unit_ids end |