Class: Dependabot::FileParsers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/file_parsers/base.rb,
lib/dependabot/file_parsers/base/dependency_set.rb

Defined Under Namespace

Classes: DependencySet

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dependency_files:, repo_contents_path: nil, source:, credentials: [], reject_external_code: false, options: {}) ⇒ Base

Returns a new instance of Base.


10
11
12
13
14
15
16
17
18
19
20
# File 'lib/dependabot/file_parsers/base.rb', line 10

def initialize(dependency_files:, repo_contents_path: nil, source:,
               credentials: [], reject_external_code: false, options: {})
  @dependency_files = dependency_files
  @repo_contents_path = repo_contents_path
  @credentials = credentials
  @source = source
  @reject_external_code = reject_external_code
  @options = options

  check_required_files
end

Instance Attribute Details

#credentialsObject (readonly)

Returns the value of attribute credentials.


8
9
10
# File 'lib/dependabot/file_parsers/base.rb', line 8

def credentials
  @credentials
end

#dependency_filesObject (readonly)

Returns the value of attribute dependency_files.


8
9
10
# File 'lib/dependabot/file_parsers/base.rb', line 8

def dependency_files
  @dependency_files
end

#optionsObject (readonly)

Returns the value of attribute options.


8
9
10
# File 'lib/dependabot/file_parsers/base.rb', line 8

def options
  @options
end

#repo_contents_pathObject (readonly)

Returns the value of attribute repo_contents_path.


8
9
10
# File 'lib/dependabot/file_parsers/base.rb', line 8

def repo_contents_path
  @repo_contents_path
end

#sourceObject (readonly)

Returns the value of attribute source.


8
9
10
# File 'lib/dependabot/file_parsers/base.rb', line 8

def source
  @source
end

Instance Method Details

#parseObject

Raises:

  • (NotImplementedError)

22
23
24
# File 'lib/dependabot/file_parsers/base.rb', line 22

def parse
  raise NotImplementedError
end