Module: Serega::SeregaMapPoint::InstanceMethods
Overview
SeregaMapPoint instance methods
Instance Attribute Summary collapse
-
#attribute ⇒ Serega::SeregaAttribute
readonly
Current attribute.
-
#nested_points ⇒ NilClass, Array<Serega::SeregaMapPoint>
readonly
Nested points or nil.
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)
Returns Current attribute.
15 16 17 |
# File 'lib/serega/map_point.rb', line 15 def attribute @attribute end |
#nested_points ⇒ NilClass, Array<Serega::SeregaMapPoint> (readonly)
Returns Nested points or nil.
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)
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
39 40 41 42 |
# File 'lib/serega/map_point.rb', line 39 def initialize(attribute, nested_points) @attribute = attribute @nested_points = nested_points end |
#many ⇒ Object
Attribute `many` option
29 |
# File 'lib/serega/map_point.rb', line 29 def_delegators :@attribute, :name, :value, :many |
#name ⇒ Object
Attribute `name`
29 |
# File 'lib/serega/map_point.rb', line 29 def_delegators :@attribute, :name, :value, :many |
#nested_object_serializer ⇒ Serega::SeregaObjectSerializer
Returns object serializer for nested points.
56 57 58 |
# File 'lib/serega/map_point.rb', line 56 def nested_object_serializer attribute.serializer::SeregaObjectSerializer end |
#value ⇒ Object
Attribute `value` block
29 |
# File 'lib/serega/map_point.rb', line 29 def_delegators :@attribute, :name, :value, :many |