Exception: Berkshelf::InvalidSourceURI
- Inherits:
-
BerkshelfError
- Object
- StandardError
- BerkshelfError
- Berkshelf::InvalidSourceURI
- Defined in:
- lib/berkshelf/errors.rb
Instance Method Summary collapse
-
#initialize(url, reason = nil) ⇒ InvalidSourceURI
constructor
A new instance of InvalidSourceURI.
- #to_s ⇒ Object (also: #message)
Methods inherited from BerkshelfError
Constructor Details
#initialize(url, reason = nil) ⇒ InvalidSourceURI
Returns a new instance of InvalidSourceURI.
426 427 428 429 |
# File 'lib/berkshelf/errors.rb', line 426 def initialize(url, reason = nil) @url = url @reason = reason end |
Instance Method Details
#to_s ⇒ Object Also known as: message
431 432 433 434 435 |
# File 'lib/berkshelf/errors.rb', line 431 def to_s msg = "'#{@url}' is not a valid Berkshelf source URI." msg << " #{@reason}." unless @reason.nil? msg end |