123456789_123456789_123456789_123456789_123456789_

Class: Gem::NameTuple

Relationships & Source Files
Inherits: Object
Defined in: lib/bundler/rubygems_ext.rb

Class Method Summary

Instance Method Summary

Constructor Details

.new(name, version, platform = Gem::Platform::RUBY) ⇒ NameTuple

[ GitHub ]

  
# File 'lib/bundler/rubygems_ext.rb', line 419

def initialize(name, version, platform=Gem::Platform::RUBY)
  if Gem::Platform === platform
    initialize_with_platform(name, version, platform.to_s)
  else
    initialize_with_platform(name, version, platform)
  end
end

Instance Method Details

#initialize_with_platform

[ GitHub ]

  
# File 'lib/bundler/rubygems_ext.rb', line 417

alias_method :initialize_with_platform, :initialize

#lock_name

[ GitHub ]

  
# File 'lib/bundler/rubygems_ext.rb', line 428

def lock_name
  if platform == Gem::Platform::RUBY
    "#{name} (#{version})"
  else
    "#{name} (#{version}-#{platform})"
  end
end