class Gem::NameTuple
def self.from_list(list)
def self.from_list(list) list.map {|t| new(*t) } end
def self.null
def self.null new nil, Gem::Version.new(0), nil end
def self.to_basic(list)
def self.to_basic(list) list.map(&:to_a) end
def <=>(other)
def <=>(other) [@name, @version, Gem::Platform.sort_priority(@platform)] <=> [other.name, other.version, Gem::Platform.sort_priority(other.platform)] end
def ==(other)
def ==(other) case other when self.class @name == other.name && @version == other.version && @platform == other.platform when Array to_a == other else false end end
def full_name
def full_name case @platform when nil, "", Gem::Platform::RUBY "#{@name}-#{@version}" else "#{@name}-#{@version}-#{@platform}" end end
def hash
def hash to_a.hash end
def initialize(name, version, platform=Gem::Platform::RUBY)
def initialize(name, version, platform=Gem::Platform::RUBY) @name = name @version = version platform &&= platform.to_s platform = Gem::Platform::RUBY if !platform || platform.empty? @platform = platform end
def inspect # :nodoc:
def inspect # :nodoc: "#<Gem::NameTuple #{@name}, #{@version}, #{@platform}>" end
def match_platform?
def match_platform? Gem::Platform.match_gem? @platform, @name end
def prerelease?
#
def prerelease? @version.prerelease? end
def spec_name
def spec_name "#{full_name}.gemspec" end
def to_a
def to_a [@name, @version, @platform] end