Class: ActiveRecord::ConnectionAdapters::AbstractAdapter::Version
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::AbstractAdapter::Version
- Includes:
- Comparable
- Defined in:
- lib/active_record/connection_adapters/abstract_adapter.rb
Instance Method Summary collapse
- #<=>(version_string) ⇒ Object
-
#initialize(version_string) ⇒ Version
constructor
A new instance of Version.
Constructor Details
#initialize(version_string) ⇒ Version
Returns a new instance of Version.
133 134 135 |
# File 'lib/active_record/connection_adapters/abstract_adapter.rb', line 133 def initialize(version_string) @version = version_string.split(".").map(&:to_i) end |
Instance Method Details
#<=>(version_string) ⇒ Object
137 138 139 |
# File 'lib/active_record/connection_adapters/abstract_adapter.rb', line 137 def <=>(version_string) @version <=> version_string.split(".").map(&:to_i) end |