Class: ActiveRecord::ConnectionAdapters::AbstractAdapter::Version

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

Instance Method Summary collapse

Constructor Details

#initialize(version_string) ⇒ Version


122
123
124
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 122

def initialize(version_string)
  @version = version_string.split('.').map(&:to_i)
end

Instance Method Details

#<=>(version_string) ⇒ Object


126
127
128
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 126

def <=>(version_string)
  @version <=> version_string.split('.').map(&:to_i)
end