class Babeltrace2::BTVersion::Number
Attributes
extra[R]
major[R]
minor[R]
patch[R]
Public Class Methods
new(major, minor, patch, extra = nil)
click to toggle source
# File lib/babeltrace2/version.rb, line 47 def initialize(major, minor, patch, extra = nil) @major = major @minor = minor @patch = patch @extra = extra end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/babeltrace2/version.rb, line 64 def <=>(other) to_a <=> other.to_a end
to_a()
click to toggle source
# File lib/babeltrace2/version.rb, line 60 def to_a [@major, @minor, @patch] end
to_s()
click to toggle source
# File lib/babeltrace2/version.rb, line 54 def to_s str = "#{@major}.#{@minor}.#{@patch}" str << " (#{extra})" if extra str end