Exception: Spud::NotFoundError
- Inherits:
-
StandardError
- Object
- StandardError
- Spud::NotFoundError
- Defined in:
- lib/spud_core/exceptions.rb
Instance Attribute Summary collapse
-
#item ⇒ Object
Returns the value of attribute item.
-
#request_url ⇒ Object
Returns the value of attribute request_url.
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ NotFoundError
constructor
A new instance of NotFoundError.
Constructor Details
#initialize(opts = {}) ⇒ NotFoundError
Returns a new instance of NotFoundError.
9 10 11 12 13 |
# File 'lib/spud_core/exceptions.rb', line 9 def initialize(opts={}) @item = opts[:item] || 'page' @template = opts[:template] || nil super("The #{item.downcase} you were looking for could not be found.") end |
Instance Attribute Details
#item ⇒ Object
Returns the value of attribute item.
7 8 9 |
# File 'lib/spud_core/exceptions.rb', line 7 def item @item end |
#request_url ⇒ Object
Returns the value of attribute request_url.
7 8 9 |
# File 'lib/spud_core/exceptions.rb', line 7 def request_url @request_url end |
#template ⇒ Object
Returns the value of attribute template.
7 8 9 |
# File 'lib/spud_core/exceptions.rb', line 7 def template @template end |