Module: Bibliothecary::MultiParsers::JSONRuntime
- Included in:
- Parsers::Dub, Parsers::Elm, Parsers::Haxelib, Parsers::Meteor, Parsers::Nuget
- Defined in:
- lib/bibliothecary/multi_parsers/json_runtime.rb
Overview
Provide JSON Runtime Manifest parsing
Instance Method Summary collapse
-
#parse_json_runtime_manifest(file_contents, options: {}) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument.
Instance Method Details
#parse_json_runtime_manifest(file_contents, options: {}) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument
5 6 7 8 9 10 11 12 13 |
# File 'lib/bibliothecary/multi_parsers/json_runtime.rb', line 5 def parse_json_runtime_manifest(file_contents, options: {}) # rubocop:disable Lint/UnusedMethodArgument JSON.parse(file_contents).fetch("dependencies",[]).map do |name, requirement| Dependency.new( name: name, requirement: requirement, type: "runtime", ) end end |