Class: ActiveRecord::ConnectionAdapters::SQLite3Adapter::Version

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

Instance Method Summary collapse

Constructor Details

#initialize(version_string) ⇒ Version

Returns a new instance of Version.



80
81
82
# File 'lib/active_record/connection_adapters/sqlite3_adapter.rb', line 80

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

Instance Method Details

#<=>(version_string) ⇒ Object



84
85
86
# File 'lib/active_record/connection_adapters/sqlite3_adapter.rb', line 84

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