Module: Serega::SeregaPlanPoint::InstanceMethods

Extended by:
Forwardable
Included in:
Serega::SeregaPlanPoint
Defined in:
lib/serega/plan_point.rb

Overview

SeregaPlanPoint instance methods

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributeSeregaAttribute (readonly)

Shows current attribute

Returns:



20
21
22
# File 'lib/serega/plan_point.rb', line 20

def attribute
  @attribute
end

#child_planSeregaPlan? (readonly)

Shows child plan if exists

Returns:

  • (SeregaPlan, nil)

    Attribute serialization plan



24
25
26
# File 'lib/serega/plan_point.rb', line 24

def child_plan
  @child_plan
end

#modifiersHash (readonly)

Child fields to serialize

Returns:

  • (Hash)

    Attributes to serialize



28
29
30
# File 'lib/serega/plan_point.rb', line 28

def modifiers
  @modifiers
end

#planSeregaAttribute

Link to current plan this point belongs to

Returns:



16
17
18
# File 'lib/serega/plan_point.rb', line 16

def plan
  @plan
end

Instance Method Details

#child_object_serializerSeregaObjectSerializer

Returns object serializer for child plan.

Returns:



64
65
66
# File 'lib/serega/plan_point.rb', line 64

def child_object_serializer
  serializer::SeregaObjectSerializer
end

#initialize(attribute, modifiers = nil) ⇒ SeregaPlanPoint

Initializes plan point

Parameters:

  • attribute (SeregaAttribute)

    Attribute to construct plan point

  • modifiers (defaults to: nil)

    Serialization parameters

Options Hash (modifiers):

  • :only (Hash)

    The only attributes to serialize

  • :except (Hash)

    Attributes to hide

  • :with (Hash)

    Hidden attributes to serialize additionally

Returns:



55
56
57
58
59
# File 'lib/serega/plan_point.rb', line 55

def initialize(attribute, modifiers = nil)
  @attribute = attribute
  @modifiers = modifiers
  set_normalized_vars
end

#manyObject

Attribute ‘many` option



42
# File 'lib/serega/plan_point.rb', line 42

def_delegators :@attribute, :name, :value, :many, :serializer

#nameObject

Attribute ‘name`



42
# File 'lib/serega/plan_point.rb', line 42

def_delegators :@attribute, :name, :value, :many, :serializer

#serializerObject

Attribute ‘serializer` option



42
# File 'lib/serega/plan_point.rb', line 42

def_delegators :@attribute, :name, :value, :many, :serializer

#valueObject

Attribute ‘value` block



42
# File 'lib/serega/plan_point.rb', line 42

def_delegators :@attribute, :name, :value, :many, :serializer