Exception: Dependabot::DependencyFileNotFound
- Inherits:
-
DependabotError
- Object
- StandardError
- DependabotError
- Dependabot::DependencyFileNotFound
- Defined in:
- lib/dependabot/errors.rb
Overview
File level errors #
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.
57 58 59 60 |
# File 'lib/dependabot/errors.rb', line 57 def initialize(file_path, msg = nil) @file_path = file_path super(msg) end |
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
55 56 57 |
# File 'lib/dependabot/errors.rb', line 55 def file_path @file_path end |
Instance Method Details
#directory ⇒ Object
66 67 68 69 |
# File 'lib/dependabot/errors.rb', line 66 def directory # Directory should always start with a `/` file_path.split("/")[0..-2].join("/").sub(%r{^/*}, "/") end |
#file_name ⇒ Object
62 63 64 |
# File 'lib/dependabot/errors.rb', line 62 def file_name file_path.split("/").last end |