Class: Bundler::CompactIndexClient::GemParser
- Inherits:
-
Object
- Object
- Bundler::CompactIndexClient::GemParser
- Defined in:
- lib/bundler/compact_index_client/gem_parser.rb
Instance Method Summary collapse
Instance Method Details
#parse(line) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/bundler/compact_index_client/gem_parser.rb', line 6 def parse(line) version_and_platform, rest = line.split(" ", 2) version, platform = version_and_platform.split("-", 2) dependencies, requirements = rest.split("|", 2) if rest dependencies = dependencies ? parse_dependencies(dependencies) : [] requirements = requirements ? parse_requirements(requirements) : [] [version, platform, dependencies, requirements] end |