Module: Serega::SeregaPlan::InstanceMethods

Included in:
Serega::SeregaPlan
Defined in:
lib/serega/plan.rb

Overview

SeregaPlan instance methods

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parent_plan_pointSeregaPlanPoint?

Parent plan point

Returns:



62
63
64
# File 'lib/serega/plan.rb', line 62

def parent_plan_point
  @parent_plan_point
end

#pointsArray<SeregaPlanPoint> (readonly)

Serialization points

Returns:



70
71
72
# File 'lib/serega/plan.rb', line 70

def points
  @points
end

Instance Method Details

#initialize(modifiers) ⇒ SeregaPlan

Instantiate new serialization plan.

Parameters:

  • modifiers

    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:



82
83
84
# File 'lib/serega/plan.rb', line 82

def initialize(modifiers)
  @points = attributes_points(modifiers)
end

#serializer_classObject

Serializer class of current plan



89
90
91
# File 'lib/serega/plan.rb', line 89

def serializer_class
  self.class.serializer_class
end