Class: ActiveRecord::ConnectionAdapters::AbstractAdapter::Version
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
self,
Comparable
|
|
Inherits: | Object |
Defined in: | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb |
Class Method Summary
Instance Attribute Summary
- #full_version_string readonly
Instance Method Summary
Constructor Details
.new(version_string, full_version_string = nil) ⇒ Version
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 279
def initialize(version_string, full_version_string = nil) @version = version_string.split(".").map(&:to_i) @full_version_string = full_version_string end
Instance Attribute Details
#full_version_string (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 277
attr_reader :full_version_string
Instance Method Details
#<=>(version_string)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 284
def <=>(version_string) @version <=> version_string.split(".").map(&:to_i) end
#to_s
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 288
def to_s @version.join(".") end