Exception: Dependabot::DependencyFileNotFound
- Inherits:
-
DependabotError
- Object
- StandardError
- DependabotError
- Dependabot::DependencyFileNotFound
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/errors.rb
Constant Summary
Constants inherited from DependabotError
Dependabot::DependabotError::BASIC_AUTH_REGEX, Dependabot::DependabotError::FURY_IO_PATH_REGEX
Instance Attribute Summary collapse
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
Instance Method Summary collapse
- #directory ⇒ Object
- #file_name ⇒ Object
-
#initialize(file_path, msg = nil) ⇒ DependencyFileNotFound
constructor
A new instance of DependencyFileNotFound.
Constructor Details
#initialize(file_path, msg = nil) ⇒ DependencyFileNotFound
Returns a new instance of DependencyFileNotFound.
478 479 480 481 |
# File 'lib/dependabot/errors.rb', line 478 def initialize(file_path, msg = nil) @file_path = file_path super(msg || "#{file_path} not found") end |
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
475 476 477 |
# File 'lib/dependabot/errors.rb', line 475 def file_path @file_path end |
Instance Method Details
#directory ⇒ Object
491 492 493 494 495 496 |
# File 'lib/dependabot/errors.rb', line 491 def directory # Directory should always start with a `/` return unless file_path T.must(T.must(file_path).split("/")[0..-2]).join("/").sub(%r{^/*}, "/") end |
#file_name ⇒ Object
484 485 486 487 488 |
# File 'lib/dependabot/errors.rb', line 484 def file_name return unless file_path T.must(file_path).split("/").last end |