Sha256: 413b52b7ad6472cda4e766525446dbcbde341ebb11fc76b6c23b666f5077d546

Contents?: true

Size: 708 Bytes

Versions: 13

Compression:

Stored size: 708 Bytes

Contents

# frozen_string_literal: true

require 'luna_park/extensions/wrappable'
require 'luna_park/extensions/attributable'
require 'luna_park/errors'

module LunaPark
  module Entities
    # add description
    class Simple
      extend  Extensions::Wrappable
      include Extensions::Attributable

      def initialize(attrs = {})
        set_attributes(attrs)
      end

      def eql?(other)
        other.is_a?(self.class) && self == other
      end

      # @abstract
      def ==(_other)
        raise Errors::AbstractMethod
      end

      def serialize
        to_h
      end

      # @abstract
      def to_h
        raise Errors::AbstractMethod
      end

      public :set_attributes
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
luna_park-0.13.2 lib/luna_park/entities/simple.rb
luna_park-0.13.1 lib/luna_park/entities/simple.rb
luna_park-0.13.0 lib/luna_park/entities/simple.rb
luna_park-0.12.1 lib/luna_park/entities/simple.rb
luna_park-0.12.0 lib/luna_park/entities/simple.rb
luna_park-0.11.7 lib/luna_park/entities/simple.rb
luna_park-0.11.6 lib/luna_park/entities/simple.rb
luna_park-0.11.5 lib/luna_park/entities/simple.rb
luna_park-0.11.4 lib/luna_park/entities/simple.rb
luna_park-0.11.3 lib/luna_park/entities/simple.rb
luna_park-0.11.2 lib/luna_park/entities/simple.rb
luna_park-0.11.1 lib/luna_park/entities/simple.rb
luna_park-0.11.0 lib/luna_park/entities/simple.rb