Class: NoSE::Serialize::UpdatePlanRepresenter
- Inherits:
-
Representable::Decorator
- Object
- Representable::Decorator
- NoSE::Serialize::UpdatePlanRepresenter
- Includes:
- Representable::Hash, Representable::JSON, Representable::Uncached, Representable::YAML
- Defined in:
- lib/nose/serialize.rb
Overview
Represent an update plan
Instance Method Summary collapse
-
#cost_model ⇒ Cost::Cost
The backend cost model used to cost the updates.
-
#cost_model=(options) ⇒ void
Look up the cost model by name and attach to the results.
Methods included from Representable::Uncached
Instance Method Details
#cost_model ⇒ Cost::Cost
The backend cost model used to cost the updates
357 358 359 360 361 |
# File 'lib/nose/serialize.rb', line 357 def cost_model = represented.cost_model.instance_variable_get(:@options) [:name] = represented.cost_model.subtype_name end |
#cost_model=(options) ⇒ void
This method returns an undefined value.
Look up the cost model by name and attach to the results
365 366 367 368 369 |
# File 'lib/nose/serialize.rb', line 365 def cost_model=() = .deep_symbolize_keys cost_model_class = Cost::Cost.subtype_class([:name]) represented.cost_model = cost_model_class.new(**) end |