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.
-
#strict ⇒ Object
readonly
Returns the value of attribute strict.
Attributes inherited from SqlTypeMetadata
#limit, #precision, #scale, #sql_type, #type
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(type_metadata, extra: "", strict: false) ⇒ TypeMetadata
constructor
A new instance of TypeMetadata.
Constructor Details
#initialize(type_metadata, extra: "", strict: false) ⇒ TypeMetadata
Returns a new instance of TypeMetadata.
7 8 9 10 11 12 |
# File 'lib/active_record/connection_adapters/mysql/type_metadata.rb', line 7 def initialize(, extra: "", strict: false) super() @type_metadata = @extra = extra @strict = strict end |
Instance Attribute Details
#extra ⇒ Object (readonly)
Returns the value of attribute extra.
5 6 7 |
# File 'lib/active_record/connection_adapters/mysql/type_metadata.rb', line 5 def extra @extra end |
#strict ⇒ Object (readonly)
Returns the value of attribute strict.
5 6 7 |
# File 'lib/active_record/connection_adapters/mysql/type_metadata.rb', line 5 def strict @strict end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
14 15 16 17 |
# File 'lib/active_record/connection_adapters/mysql/type_metadata.rb', line 14 def ==(other) other.is_a?(MySQL::TypeMetadata) && attributes_for_hash == other.attributes_for_hash end |
#hash ⇒ Object
20 21 22 |
# File 'lib/active_record/connection_adapters/mysql/type_metadata.rb', line 20 def hash attributes_for_hash.hash end |