method
new
Ruby latest stable (v2_5_5)
-
0 notes -
Class: StubLine
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
new(data, extensions)
public
Hide source
# File lib/rubygems/stub_specification.rb, line 39 def initialize data, extensions parts = data[PREFIX.length..-1].split(" ".freeze, 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("\00"".freeze).map! { |x| REQUIRE_PATHS[x] || x } end