Exception: Dependabot::DependencyFileNotParseable
- Inherits:
-
DependabotError
- Object
- StandardError
- DependabotError
- Dependabot::DependencyFileNotParseable
- 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) ⇒ DependencyFileNotParseable
constructor
A new instance of DependencyFileNotParseable.
Constructor Details
#initialize(file_path, msg = nil) ⇒ DependencyFileNotParseable
Returns a new instance of DependencyFileNotParseable.
506 507 508 509 |
# File 'lib/dependabot/errors.rb', line 506 def initialize(file_path, msg = nil) @file_path = file_path super(msg || "#{file_path} not parseable") end |
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
503 504 505 |
# File 'lib/dependabot/errors.rb', line 503 def file_path @file_path end |
Instance Method Details
#directory ⇒ Object
517 518 519 520 |
# File 'lib/dependabot/errors.rb', line 517 def directory # Directory should always start with a `/` T.must(file_path.split("/")[0..-2]).join("/").sub(%r{^/*}, "/") end |
#file_name ⇒ Object
512 513 514 |
# File 'lib/dependabot/errors.rb', line 512 def file_name T.must(file_path.split("/").last) end |