Class: Bibliothecary::Parsers::Dub

Inherits:
Object
  • Object
show all
Extended by:
MultiParsers::JSONRuntime
Includes:
Analyser
Defined in:
lib/bibliothecary/parsers/dub.rb

Class Method Summary collapse

Methods included from MultiParsers::JSONRuntime

parse_json_runtime_manifest

Methods included from Analyser

create_analysis, create_error_analysis, included

Class Method Details

.mappingObject



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/bibliothecary/parsers/dub.rb', line 10

def self.mapping
  {
    match_filename("dub.json") => {
      kind: 'manifest',
      parser: :parse_json_runtime_manifest
    },
    match_filename("dub.sdl") => {
      kind: 'manifest',
      parser: :parse_sdl_manifest
    }
  }
end

.parse_sdl_manifest(file_contents, options: {}) ⇒ Object



25
26
27
# File 'lib/bibliothecary/parsers/dub.rb', line 25

def self.parse_sdl_manifest(file_contents, options: {})
  SdlParser.new(:runtime, file_contents).dependencies
end