Exception: CookbookOmnifetch::NotACookbook
- Inherits:
-
OmnifetchError
- Object
- StandardError
- OmnifetchError
- CookbookOmnifetch::NotACookbook
- Defined in:
- lib/cookbook-omnifetch/exceptions.rb
Overview
NOTE: This is the only error class copied from berks that is also used elsewhere in berks, in ‘berkshelf/init_generator’
Instance Method Summary collapse
-
#initialize(path) ⇒ NotACookbook
constructor
A new instance of NotACookbook.
- #to_s ⇒ Object
Methods inherited from OmnifetchError
Constructor Details
#initialize(path) ⇒ NotACookbook
Returns a new instance of NotACookbook.
51 52 53 54 |
# File 'lib/cookbook-omnifetch/exceptions.rb', line 51 def initialize(path) @path = File.(path) rescue path super(to_s) end |
Instance Method Details
#to_s ⇒ Object
56 57 58 59 |
# File 'lib/cookbook-omnifetch/exceptions.rb', line 56 def to_s "The resource at '#{@path}' does not appear to be a valid cookbook. " \ "Does it have a metadata.rb?" end |