Exception: Dependabot::DependencyFileNotParseable
- Inherits:
-
DependabotError
- Object
- StandardError
- DependabotError
- Dependabot::DependencyFileNotParseable
- Defined in:
- lib/dependabot/errors.rb
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) ⇒ DependencyFileNotParseable
constructor
A new instance of DependencyFileNotParseable.
Constructor Details
#initialize(file_path, msg = nil) ⇒ DependencyFileNotParseable
Returns a new instance of DependencyFileNotParseable.
75 76 77 78 |
# File 'lib/dependabot/errors.rb', line 75 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.
73 74 75 |
# File 'lib/dependabot/errors.rb', line 73 def file_path @file_path end |
Instance Method Details
#directory ⇒ Object
84 85 86 87 |
# File 'lib/dependabot/errors.rb', line 84 def directory # Directory should always start with a `/` file_path.split("/")[0..-2].join("/").sub(%r{^/*}, "/") end |
#file_name ⇒ Object
80 81 82 |
# File 'lib/dependabot/errors.rb', line 80 def file_name file_path.split("/").last end |