Class: ActiveRecord::ConnectionAdapters::MySQL::TypeMetadata
- Inherits:
-
SqlTypeMetadata
- Object
- SqlTypeMetadata
- ActiveRecord::ConnectionAdapters::MySQL::TypeMetadata
- Defined in:
- 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: "") ⇒ TypeMetadata
constructor
A new instance of TypeMetadata.
Constructor Details
#initialize(type_metadata, extra: "") ⇒ TypeMetadata
Returns a new instance of TypeMetadata.
11 12 13 14 15 |
# File 'lib/active_record/connection_adapters/mysql/type_metadata.rb', line 11 def initialize(, extra: "") super() @type_metadata = @extra = extra end |
Instance Attribute Details
#extra ⇒ Object (readonly)
Returns the value of attribute extra.
9 10 11 |
# File 'lib/active_record/connection_adapters/mysql/type_metadata.rb', line 9 def extra @extra end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
17 18 19 20 |
# File 'lib/active_record/connection_adapters/mysql/type_metadata.rb', line 17 def ==(other) other.is_a?(MySQL::TypeMetadata) && attributes_for_hash == other.attributes_for_hash end |
#hash ⇒ Object
23 24 25 |
# File 'lib/active_record/connection_adapters/mysql/type_metadata.rb', line 23 def hash attributes_for_hash.hash end |