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: []) ⇒ Base

Returns a new instance of Base.


8
9
10
11
12
13
14
15
16
# File 'lib/dependabot/file_parsers/base.rb', line 8

def initialize(dependency_files:, repo_contents_path: nil, source:,
               credentials: [])
  @dependency_files = dependency_files
  @repo_contents_path = repo_contents_path
  @credentials = credentials
  @source = source

  check_required_files
end

Instance Attribute Details

#credentialsObject (readonly)

Returns the value of attribute credentials


6
7
8
# File 'lib/dependabot/file_parsers/base.rb', line 6

def credentials
  @credentials
end

#dependency_filesObject (readonly)

Returns the value of attribute dependency_files


6
7
8
# File 'lib/dependabot/file_parsers/base.rb', line 6

def dependency_files
  @dependency_files
end

#repo_contents_pathObject (readonly)

Returns the value of attribute repo_contents_path


6
7
8
# File 'lib/dependabot/file_parsers/base.rb', line 6

def repo_contents_path
  @repo_contents_path
end

#sourceObject (readonly)

Returns the value of attribute source


6
7
8
# File 'lib/dependabot/file_parsers/base.rb', line 6

def source
  @source
end

Instance Method Details

#parseObject

Raises:

  • (NotImplementedError)

18
19
20
# File 'lib/dependabot/file_parsers/base.rb', line 18

def parse
  raise NotImplementedError
end