Module: GLib::Version

Defined in:
lib/glib2/version.rb

Constant Summary collapse

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

Class Method Summary collapse

Class Method Details

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

Returns:

  • (Boolean)


25
26
27
28
29
30
31
32
33
# File 'lib/glib2/version.rb', line 25

def or_later?(major, minor, micro=nil)
  micro ||= 0
  version = [
    MAJOR,
    MINOR,
    MICRO,
  ]
  (version <=> [major, minor, micro]) >= 0
end