Module: Serega::SeregaMapPoint::InstanceMethods
Overview
SeregaMapPoint instance methods
Instance Attribute Summary collapse
-
#attribute ⇒ Serega::SeregaAttribute
readonly
Shows current attribute.
-
#nested_points ⇒ NilClass, Array<Serega::SeregaMapPoint>
readonly
Shows nested points.
Instance Method Summary collapse
-
#has_nested_points? ⇒ Boolean
Checks if attribute has nested points (is a link to another serializer).
-
#initialize(attribute, nested_points) ⇒ Serega::SeregaMapPoint
Initializes map point.
-
#many ⇒ Object
Attribute
many
option. -
#name ⇒ Object
Attribute
name
. -
#nested_object_serializer ⇒ Serega::SeregaObjectSerializer
Object serializer for nested points.
-
#value ⇒ Object
Attribute
value
block.
Instance Attribute Details
#attribute ⇒ Serega::SeregaAttribute (readonly)
Shows current attribute
16 17 18 |
# File 'lib/serega/map_point.rb', line 16 def attribute @attribute end |
#nested_points ⇒ NilClass, Array<Serega::SeregaMapPoint> (readonly)
Shows nested points
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)
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
41 42 43 44 |
# File 'lib/serega/map_point.rb', line 41 def initialize(attribute, nested_points) @attribute = attribute @nested_points = nested_points end |
#many ⇒ Object
Attribute many
option
31 |
# File 'lib/serega/map_point.rb', line 31 def_delegators :@attribute, :name, :value, :many |
#name ⇒ Object
Attribute name
31 |
# File 'lib/serega/map_point.rb', line 31 def_delegators :@attribute, :name, :value, :many |
#nested_object_serializer ⇒ Serega::SeregaObjectSerializer
Returns object serializer for nested points.
58 59 60 |
# File 'lib/serega/map_point.rb', line 58 def nested_object_serializer attribute.serializer::SeregaObjectSerializer end |
#value ⇒ Object
Attribute value
block
31 |
# File 'lib/serega/map_point.rb', line 31 def_delegators :@attribute, :name, :value, :many |