Class: ActiveRecord::ConnectionAdapters::MySQL::TypeMetadata
- Inherits:
-
SqlTypeMetadata
- Object
- SqlTypeMetadata
- ActiveRecord::ConnectionAdapters::MySQL::TypeMetadata
- Includes:
- Deduplicable
- Defined in:
- activerecord/lib/active_record/connection_adapters/mysql/type_metadata.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#extra ⇒ Object
readonly
Returns the value of attribute extra.
Attributes inherited from SqlTypeMetadata
#limit, #precision, #scale, #sql_type, #type
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(type_metadata, extra: nil) ⇒ TypeMetadata
constructor
A new instance of TypeMetadata.
Methods included from Deduplicable
Methods included from ActiveSupport::Concern
#append_features, #class_methods, extended, #included
Constructor Details
#initialize(type_metadata, extra: nil) ⇒ TypeMetadata
Returns a new instance of TypeMetadata.
13 14 15 16 |
# File 'activerecord/lib/active_record/connection_adapters/mysql/type_metadata.rb', line 13 def initialize(, extra: nil) super() @extra = extra end |
Instance Attribute Details
#extra ⇒ Object (readonly)
Returns the value of attribute extra
11 12 13 |
# File 'activerecord/lib/active_record/connection_adapters/mysql/type_metadata.rb', line 11 def extra @extra end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
18 19 20 21 22 |
# File 'activerecord/lib/active_record/connection_adapters/mysql/type_metadata.rb', line 18 def ==(other) other.is_a?(TypeMetadata) && __getobj__ == other.__getobj__ && extra == other.extra end |
#hash ⇒ Object
25 26 27 28 29 |
# File 'activerecord/lib/active_record/connection_adapters/mysql/type_metadata.rb', line 25 def hash TypeMetadata.hash ^ __getobj__.hash ^ extra.hash end |