Module: Serega::SeregaMapPoint::InstanceMethods

Extended by:
Forwardable
Included in:
Serega::SeregaMapPoint
Defined in:
lib/serega/map_point.rb

Overview

SeregaMapPoint instance methods

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributeSerega::SeregaAttribute (readonly)

Shows current attribute

Returns:



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

def attribute
  @attribute
end

#nested_pointsNilClass, Array<Serega::SeregaMapPoint> (readonly)

Shows nested points

Returns:



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

def nested_points
  @nested_points
end

Instance Method Details

#has_nested_points?Boolean

Checks if attribute has nested points (is a link to another serializer)

Returns:

  • (Boolean)

    whether attribute has nested points



51
52
53
# File 'lib/serega/map_point.rb', line 51

def has_nested_points?
  !nested_points.nil?
end

#initialize(attribute, nested_points) ⇒ Serega::SeregaMapPoint

Initializes map point

Parameters:

Returns:



41
42
43
44
# File 'lib/serega/map_point.rb', line 41

def initialize(attribute, nested_points)
  @attribute = attribute
  @nested_points = nested_points
end

#manyObject

Attribute many option



31
# File 'lib/serega/map_point.rb', line 31

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

#nameObject

Attribute name



31
# File 'lib/serega/map_point.rb', line 31

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

#nested_object_serializerSerega::SeregaObjectSerializer

Returns object serializer for nested points.

Returns:



58
59
60
# File 'lib/serega/map_point.rb', line 58

def nested_object_serializer
  attribute.serializer::SeregaObjectSerializer
end

#valueObject

Attribute value block



31
# File 'lib/serega/map_point.rb', line 31

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