Module: RestfulError::Helper

Included in:
BaseError
Defined in:
lib/restful_error.rb

Instance Method Summary collapse

Instance Method Details

#response_messageObject



16
17
18
19
# File 'lib/restful_error.rb', line 16

def response_message
  return @response_message unless @response_message.nil?
  @response_message = RestfulError.localized_phrase(self.class.name, restful)
end

#restfulObject



10
11
12
13
14
15
# File 'lib/restful_error.rb', line 10

def restful
  @restful ||= begin
    raise NotImplementedError, "http_status must be implemented by including class" unless respond_to?(:http_status)
    RestfulError.build_status_from_symbol_or_code(http_status)
  end
end