Exception: Spud::NotFoundError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/spud_core/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#itemObject

Returns the value of attribute item.



7
8
9
# File 'lib/spud_core/exceptions.rb', line 7

def item
  @item
end

#request_urlObject

Returns the value of attribute request_url.



7
8
9
# File 'lib/spud_core/exceptions.rb', line 7

def request_url
  @request_url
end

#templateObject

Returns the value of attribute template.



7
8
9
# File 'lib/spud_core/exceptions.rb', line 7

def template
  @template
end