class Environment::Version

Constants

ALPHA
DEVELOP
OUT

Attributes

debug[R]
devel[R]
major[R]
mejor[R]
minor[R]

Public Class Methods

new(major, minor, debug, devel=0) click to toggle source
# File core/environment.rb, line 62
def initialize(major, minor, debug, devel=0)
  @major = major
  @minor = minor
  @debug = debug
  @devel = devel
end

Public Instance Methods

<=>(other) click to toggle source
# File core/environment.rb, line 100
def <=>(other)
  self.to_a <=> other.to_a
end
inspect() click to toggle source
# File core/environment.rb, line 92
def inspect
  "#{Environment::NAME} ver.#{self.to_s}"
end
size() click to toggle source
# File core/environment.rb, line 96
def size
  to_a.size
end
to_a() click to toggle source
# File core/environment.rb, line 69
def to_a
  [@major, @minor, @debug, @devel]
end
to_f() click to toggle source
# File core/environment.rb, line 88
def to_f
  @major + @minor/100
end
to_i() click to toggle source
# File core/environment.rb, line 84
def to_i
  @major
end
to_s() click to toggle source
# File core/environment.rb, line 73
def to_s
  case @devel
  when OUT
    [@major, @minor, @debug].join('.')
  when ALPHA
    [@major, @minor, @debug].join('.') + "-alpha#{@devel}"
  when DEVELOP
    [@major, @minor, @debug].join('.') + "-develop"
  end
end