Class: Phronomy::Agent::ContextPlan

Inherits:
Data
  • Object
show all
Defined in:
lib/phronomy/agent/context_plan.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_contentsObject (readonly)

Returns the value of attribute derived_contents

Returns:

  • (Object)

    the current value of derived_contents



5
6
7
# File 'lib/phronomy/agent/context_plan.rb', line 5

def derived_contents
  @derived_contents
end

#metadataObject (readonly)

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



5
6
7
# File 'lib/phronomy/agent/context_plan.rb', line 5

def 
  @metadata
end

#ordering_hintsObject (readonly)

Returns the value of attribute ordering_hints

Returns:

  • (Object)

    the current value of ordering_hints



5
6
7
# File 'lib/phronomy/agent/context_plan.rb', line 5

def ordering_hints
  @ordering_hints
end

#policy_descriptorObject (readonly)

Returns the value of attribute policy_descriptor

Returns:

  • (Object)

    the current value of policy_descriptor



5
6
7
# File 'lib/phronomy/agent/context_plan.rb', line 5

def policy_descriptor
  @policy_descriptor
end

#selected_tool_idsObject (readonly)

Returns the value of attribute selected_tool_ids

Returns:

  • (Object)

    the current value of 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_idsObject (readonly)

Returns the value of attribute selected_unit_ids

Returns:

  • (Object)

    the current value of selected_unit_ids



5
6
7
# File 'lib/phronomy/agent/context_plan.rb', line 5

def selected_unit_ids
  @selected_unit_ids
end