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)

Returns Current attribute.

Returns:



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

def attribute
  @attribute
end

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

Returns Nested points or nil.

Returns:



18
19
20
# File 'lib/serega/map_point.rb', line 18

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



49
50
51
# File 'lib/serega/map_point.rb', line 49

def has_nested_points?
  !nested_points.nil?
end

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

Initializes map point

Parameters:

Returns:



39
40
41
42
# File 'lib/serega/map_point.rb', line 39

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

#manyObject

Attribute `many` option



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

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

#nameObject

Attribute `name`



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

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

#nested_object_serializerSerega::SeregaObjectSerializer

Returns object serializer for nested points.

Returns:



56
57
58
# File 'lib/serega/map_point.rb', line 56

def nested_object_serializer
  attribute.serializer::SeregaObjectSerializer
end

#valueObject

Attribute `value` block



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

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