Exception: ErrorsHelper::NotFound

Inherits:
Base
  • Object
show all
Defined in:
lib/errors_helper/not_found.rb

Instance Attribute Summary

Attributes inherited from Base

#code, #message

Instance Method Summary collapse

Methods inherited from Base

#inspect, #status, #to_hash

Constructor Details

#initialize(code: '07', status: nil) ⇒ NotFound

Returns a new instance of NotFound.



5
6
7
8
9
10
# File 'lib/errors_helper/not_found.rb', line 5

def initialize(code: '07', status: nil)
  value = ErrorsHelper.build_response(code: code)
  super message: value[:message] || ErrorsHelper.build_response(code: '07')[:message],
        code: value[:code] || ErrorsHelper.build_response(code: '07')[:code],
        status: status || :not_found
end