123456789_123456789_123456789_123456789_123456789_

Class: Gem::StubSpecification::StubLine

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: lib/rubygems/stub_specification.rb

Constant Summary

Class Method Summary

Instance Attribute Summary

Constructor Details

.new(data, extensions) ⇒ StubLine

[ GitHub ]

  
# File 'lib/rubygems/stub_specification.rb', line 36

def initialize(data, extensions)
  parts          = data[PREFIX.length..-1].split(" ", 4)
  @name          = parts[0].freeze
  @version       = if Gem::Version.correct?(parts[1])
    Gem::Version.new(parts[1])
  else
    Gem::Version.new(0)
  end

  @platform      = Gem::Platform.new parts[2]
  @extensions    = extensions
  @full_name     = if platform == Gem::Platform::RUBY
    "#{name}-#{version}"
  else
    "#{name}-#{version}-#{platform}"
  end

  path_list = parts.last
  @require_paths = REQUIRE_PATH_LIST[path_list] || path_list.split("\0").map! do |x|
    REQUIRE_PATHS[x] || x
  end
end

Instance Attribute Details

#extensions (readonly)

[ GitHub ]

  
# File 'lib/rubygems/stub_specification.rb', line 16

attr_reader :name, :version, :platform, :require_paths, :extensions,
            :full_name

#full_name (readonly)

[ GitHub ]

  
# File 'lib/rubygems/stub_specification.rb', line 16

attr_reader :name, :version, :platform, :require_paths, :extensions,
            :full_name

#name (readonly)

[ GitHub ]

  
# File 'lib/rubygems/stub_specification.rb', line 16

attr_reader :name, :version, :platform, :require_paths, :extensions,
            :full_name

#platform (readonly)

[ GitHub ]

  
# File 'lib/rubygems/stub_specification.rb', line 16

attr_reader :name, :version, :platform, :require_paths, :extensions,
            :full_name

#require_paths (readonly)

[ GitHub ]

  
# File 'lib/rubygems/stub_specification.rb', line 16

attr_reader :name, :version, :platform, :require_paths, :extensions,
            :full_name

#version (readonly)

[ GitHub ]

  
# File 'lib/rubygems/stub_specification.rb', line 16

attr_reader :name, :version, :platform, :require_paths, :extensions,
            :full_name