Module: Serega::SeregaPlanPoint::InstanceMethods
- Included in:
- Serega::SeregaPlanPoint
- Defined in:
- lib/serega/plan_point.rb
Overview
SeregaPlanPoint instance methods
Instance Attribute Summary collapse
-
#attribute ⇒ SeregaAttribute
readonly
Shows current attribute.
-
#child_plan ⇒ SeregaPlan?
readonly
Shows child plan if exists.
-
#modifiers ⇒ Hash
readonly
Child fields to serialize.
-
#plan ⇒ SeregaAttribute
readonly
Link to current plan this point belongs to.
Instance Method Summary collapse
-
#child_object_serializer ⇒ SeregaObjectSerializer
Object serializer for child plan.
-
#initialize(plan, attribute, modifiers = nil) ⇒ SeregaPlanPoint
Initializes plan point.
-
#many ⇒ Object
Attribute ‘many` option.
-
#name ⇒ Object
Attribute ‘name`.
-
#serializer ⇒ Object
Attribute ‘serializer` option.
-
#value(obj, ctx) ⇒ Object
Attribute ‘value`.
Instance Attribute Details
#attribute ⇒ SeregaAttribute (readonly)
Shows current attribute
18 19 20 |
# File 'lib/serega/plan_point.rb', line 18 def attribute @attribute end |
#child_plan ⇒ SeregaPlan? (readonly)
Shows child plan if exists
22 23 24 |
# File 'lib/serega/plan_point.rb', line 22 def child_plan @child_plan end |
#modifiers ⇒ Hash (readonly)
Child fields to serialize
26 27 28 |
# File 'lib/serega/plan_point.rb', line 26 def modifiers @modifiers end |
#plan ⇒ SeregaAttribute (readonly)
Link to current plan this point belongs to
14 15 16 |
# File 'lib/serega/plan_point.rb', line 14 def plan @plan end |
Instance Method Details
#child_object_serializer ⇒ SeregaObjectSerializer
Returns object serializer for child plan.
74 75 76 |
# File 'lib/serega/plan_point.rb', line 74 def child_object_serializer serializer::SeregaObjectSerializer end |
#initialize(plan, attribute, modifiers = nil) ⇒ SeregaPlanPoint
Initializes plan point
40 41 42 43 44 45 |
# File 'lib/serega/plan_point.rb', line 40 def initialize(plan, attribute, modifiers = nil) @plan = plan @attribute = attribute @modifiers = modifiers set_normalized_vars end |
#many ⇒ Object
Attribute ‘many` option
61 62 63 |
# File 'lib/serega/plan_point.rb', line 61 def many attribute.many end |
#name ⇒ Object
Attribute ‘name`
55 56 57 |
# File 'lib/serega/plan_point.rb', line 55 def name attribute.name end |
#serializer ⇒ Object
Attribute ‘serializer` option
67 68 69 |
# File 'lib/serega/plan_point.rb', line 67 def serializer attribute.serializer end |
#value(obj, ctx) ⇒ Object
Attribute ‘value`
49 50 51 |
# File 'lib/serega/plan_point.rb', line 49 def value(obj, ctx) attribute.value(obj, ctx) end |