Sha256: 59687f64fec8ecf8abc7c33db04f9f3fac88ffe3af3d38e5caf0892c8e252d0d

Contents?: true

Size: 619 Bytes

Versions: 2

Compression:

Stored size: 619 Bytes

Contents

# frozen_string_literal: true

class Serega
  class SeregaMapPoint
    module InstanceMethods
      extend Forwardable

      attr_reader :attribute, :nested_points

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

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

      def has_nested_points?
        !nested_points.nil?
      end

      def nested_object_serializer
        attribute.serializer::SeregaObjectSerializer
      end
    end

    extend Serega::SeregaHelpers::SerializerClassHelper
    include InstanceMethods
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
serega-0.6.1 lib/serega/map_point.rb
serega-0.6.0 lib/serega/map_point.rb