Class: Staticpress::Version

Inherits:
Object
  • Object
show all
Extended by:
Comparable
Defined in:
lib/staticpress/version.rb

Constant Summary collapse

SIGNATURE =
[0, 7, 1]

Class Method Summary collapse

Class Method Details

.<=>(other) ⇒ Object



7
8
9
10
# File 'lib/staticpress/version.rb', line 7

def self.<=>(other)
  other = other.split('.').map(&:to_i) if other.respond_to? :split
  SIGNATURE <=> Array(other)
end

.to_sObject



12
13
14
# File 'lib/staticpress/version.rb', line 12

def self.to_s
  SIGNATURE.join('.')
end