Class: ActiveRecord::ConnectionAdapters::SQLiteAdapter::Version
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::SQLiteAdapter::Version
- Includes:
- Comparable
- Defined in:
- lib/active_record/connection_adapters/sqlite_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.
45 46 47 |
# File 'lib/active_record/connection_adapters/sqlite_adapter.rb', line 45 def initialize(version_string) @version = version_string.split('.').map { |v| v.to_i } end |
Instance Method Details
#<=>(version_string) ⇒ Object
49 50 51 |
# File 'lib/active_record/connection_adapters/sqlite_adapter.rb', line 49 def <=>(version_string) @version <=> version_string.split('.').map { |v| v.to_i } end |