Exception: Berkshelf::InvalidCookbookFiles
- Inherits:
-
BerkshelfError
- Object
- StandardError
- BerkshelfError
- Berkshelf::InvalidCookbookFiles
- Defined in:
- lib/berkshelf/errors.rb
Overview
Raised when a cookbook or its recipes contain a space or invalid character in the path.
Instance Method Summary collapse
-
#initialize(cookbook, files) ⇒ InvalidCookbookFiles
constructor
A new instance of InvalidCookbookFiles.
- #to_s ⇒ Object
Methods inherited from BerkshelfError
Constructor Details
#initialize(cookbook, files) ⇒ InvalidCookbookFiles
Returns a new instance of InvalidCookbookFiles.
327 328 329 330 |
# File 'lib/berkshelf/errors.rb', line 327 def initialize(cookbook, files) @cookbook = cookbook @files = files end |
Instance Method Details
#to_s ⇒ Object
332 333 334 335 336 337 338 339 340 |
# File 'lib/berkshelf/errors.rb', line 332 def to_s [ "The cookbook '#{@cookbook.cookbook_name}' has invalid filenames:", "", " " + @files.map(&:to_s).join("\n "), "", "Please note, spaces are not a valid character in filenames", ].join("\n") end |