Class: ActiveRecord::ConnectionAdapters::SQLite3Adapter::Version
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::SQLite3Adapter::Version
- Includes:
- Comparable
- Defined in:
- lib/active_record/connection_adapters/sqlite3_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.
82 83 84 |
# File 'lib/active_record/connection_adapters/sqlite3_adapter.rb', line 82 def initialize(version_string) @version = version_string.split('.').map { |v| v.to_i } end |
Instance Method Details
#<=>(version_string) ⇒ Object
86 87 88 |
# File 'lib/active_record/connection_adapters/sqlite3_adapter.rb', line 86 def <=>(version_string) @version <=> version_string.split('.').map { |v| v.to_i } end |