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

Parent plan point, if exists

Returns:



74
75
76
# File 'lib/serega/plan.rb', line 74

def parent_plan_point
  @parent_plan_point
end

#pointsArray<SeregaPlanPoint> (readonly)

Serialization points

Returns:



78
79
80
# File 'lib/serega/plan.rb', line 78

def points
  @points
end

Instance Method Details

#initialize(only:, except:, with:, parent_plan_point: nil) ⇒ SeregaPlan

Instantiate new serialization plan.

Parameters:

  • opts

    Serialization parameters

Returns:



91
92
93
94
# File 'lib/serega/plan.rb', line 91

def initialize(only:, except:, with:, parent_plan_point: nil)
  @parent_plan_point = parent_plan_point
  @points = attributes_points(only: only, except: except, with: with)
end

#serializer_classObject

Serializer class of current plan



99
100
101
# File 'lib/serega/plan.rb', line 99

def serializer_class
  self.class.serializer_class
end