Class: Dependabot::Swift::FileParser::DependencyParser
- Inherits:
-
Object
- Object
- Dependabot::Swift::FileParser::DependencyParser
- Defined in:
- lib/dependabot/swift/file_parser/dependency_parser.rb
Instance Method Summary collapse
-
#initialize(dependency_files:, repo_contents_path:, credentials:) ⇒ DependencyParser
constructor
A new instance of DependencyParser.
- #parse ⇒ Object
Constructor Details
#initialize(dependency_files:, repo_contents_path:, credentials:) ⇒ DependencyParser
Returns a new instance of DependencyParser.
12 13 14 15 16 |
# File 'lib/dependabot/swift/file_parser/dependency_parser.rb', line 12 def initialize(dependency_files:, repo_contents_path:, credentials:) @dependency_files = dependency_files @repo_contents_path = repo_contents_path @credentials = credentials end |
Instance Method Details
#parse ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/dependabot/swift/file_parser/dependency_parser.rb', line 18 def parse SharedHelpers.in_a_temporary_repo_directory(dependency_files.first.directory, repo_contents_path) do write_temporary_dependency_files SharedHelpers.with_git_configured(credentials: credentials) do subdependencies(formatted_deps) end end end |