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

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

Instance Method Summary (collapse)

Constructor Details

- (Version) initialize(version_string)

Returns a new instance of Version



42
43
44
# File 'activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb', line 42

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

Instance Method Details

- (Object) <=>(version_string)



46
47
48
# File 'activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb', line 46

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