Class: DTK::RestError::NotFound

Inherits:
RestUsageError show all
Defined in:
lib/errors/rest_error.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DTK::RestError

create, #hash_form

Constructor Details

#initialize(err) ⇒ NotFound

Returns a new instance of NotFound.



65
66
67
68
69
# File 'lib/errors/rest_error.rb', line 65

def initialize(err)
  super
  @code = :not_found
  @message = "'#{err.name}' was not found"
end

Class Method Details

.match?(err) ⇒ Boolean

Returns:

  • (Boolean)


62
63
64
# File 'lib/errors/rest_error.rb', line 62

def self.match?(err)
  err.kind_of?(::NoMethodError) and is_controller_method(err)
end