Exception: Spud::NotFoundError
- Inherits:
-
RequestError
- Object
- StandardError
- RequestError
- Spud::NotFoundError
- Defined in:
- lib/spud_core/errors.rb
Instance Attribute Summary
Attributes inherited from RequestError
#code, #item, #request_url, #template, #title
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ NotFoundError
constructor
A new instance of NotFoundError.
Constructor Details
#initialize(opts = {}) ⇒ NotFoundError
Returns a new instance of NotFoundError.
23 24 25 26 27 28 29 30 |
# File 'lib/spud_core/errors.rb', line 23 def initialize(opts={}) @item = opts[:item] || 'page' @template = opts[:template] @code = 404 @title = "Not Found" = opts[:message] || "The #{item.downcase} you were looking for could not be found." super() end |