Parent

Included Modules

DepSelector::Version

Attributes

major[R]
minor[R]
patch[R]

Public Class Methods

new(str="") click to toggle source
# File lib/dep_selector/version.rb, line 27
def initialize(str="")
  @major, @minor, @patch = parse(str)
end

Public Instance Methods

<=>(v) click to toggle source
# File lib/dep_selector/version.rb, line 39
def <=>(v)
  [:major, :minor, :patch].each do |method|
    ans = (self.send(method) <=> v.send(method))
    return ans if ans != 0
  end
  0
end
eql?(other) click to toggle source

For hash

# File lib/dep_selector/version.rb, line 54
def eql?(other)
  other.is_a?(Version) && self == other
end
hash() click to toggle source
# File lib/dep_selector/version.rb, line 47
def hash
  # Didn't put any thought or research into this, probably can be
  # done better
  to_s.hash
end
inspect() click to toggle source
# File lib/dep_selector/version.rb, line 31
def inspect
  "#{@major}.#{@minor}.#{@patch}"
end
to_s() click to toggle source
# File lib/dep_selector/version.rb, line 35
def to_s
  "#{@major}.#{@minor}.#{@patch}"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.