Class: ActiveRecord::ConnectionAdapters::SQLiteAdapter::Version

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/active_record/connection_adapters/sqlite_adapter.rb

Instance Method Summary collapse

Constructor Details

#initialize(version_string) ⇒ Version

Returns a new instance of Version.



29
30
31
# File 'lib/active_record/connection_adapters/sqlite_adapter.rb', line 29

def initialize(version_string)
  @version = version_string.split('.').map { |v| v.to_i }
end

Instance Method Details

#<=>(version_string) ⇒ Object



33
34
35
# File 'lib/active_record/connection_adapters/sqlite_adapter.rb', line 33

def <=>(version_string)
  @version <=> version_string.split('.').map { |v| v.to_i }
end