Module: Atk::Version

Defined in:
lib/atk.rb

Constant Summary collapse

MAJOR =
MAJOR_VERSION
MINOR =
MINOR_VERSION
MICRO =
MICRO_VERSION
STRING =
"#{MAJOR_VERSION}.#{MINOR_VERSION}.#{MICRO_VERSION}"

Class Method Summary collapse

Class Method Details

.or_later?(major, minor, micro = nil) ⇒ Boolean

Returns:

  • (Boolean)


45
46
47
48
49
50
51
52
53
# File 'lib/atk.rb', line 45

def or_later?(major, minor, micro=nil)
  micro ||= 0
  version = [
    MAJOR_VERSION,
    MINOR_VERSION,
    MICRO_VERSION,
  ]
  (version <=> [major, minor, micro]) >= 0
end