Sha256: 6e2bf61dfdecdde439138d161b50b8b8bd8aa29186ef7d1696958d826e5d58de

Contents?: true

Size: 679 Bytes

Versions: 7

Compression:

Stored size: 679 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  module ConnectionAdapters
    module Cubrid2
      class TypeMetadata < DelegateClass(SqlTypeMetadata) # :nodoc:
        undef to_yaml if method_defined?(:to_yaml)

        attr_reader :extra

        def initialize(type_metadata, extra: '')
          super(type_metadata)
          @extra = extra
        end

        def ==(other)
          other.is_a?(TypeMetadata) &&
            __getobj__ == other.__getobj__ &&
            extra == other.extra
        end
        alias eql? ==

        def hash
          TypeMetadata.hash ^
            __getobj__.hash ^
            extra.hash
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
activerecord-cubrid2-adapter-0.1.0 lib/active_record/connection_adapters/cubrid2/type_metadata.rb
activerecord-cubrid2-adapter-0.0.6 lib/active_record/connection_adapters/cubrid2/type_metadata.rb
activerecord-cubrid2-adapter-0.0.5 lib/active_record/connection_adapters/cubrid2/type_metadata.rb
activerecord-cubrid2-adapter-0.0.4 lib/active_record/connection_adapters/cubrid2/type_metadata.rb
activerecord-cubrid2-adapter-0.0.3 lib/active_record/connection_adapters/cubrid2/type_metadata.rb
activerecord-cubrid2-adapter-0.0.2 lib/active_record/connection_adapters/cubrid2/type_metadata.rb
activerecord-cubrid2-adapter-0.0.1 lib/active_record/connection_adapters/cubrid2/type_metadata.rb