Class: RestApplication

Inherits:
Sinatra::Base
  • Object
show all
Extended by:
RestResponseModel
Defined in:
lib/rest/rest_base.rb,
lib/rest/rest_error_handler.rb

Direct Known Subclasses

RestBase

Instance Method Summary collapse

Methods included from RestResponseModel

error_response, success_response

Instance Method Details

#response_with_error(exception_class, errors = []) ⇒ Object



29
30
31
32
# File 'lib/rest/rest_error_handler.rb', line 29

def response_with_error(exception_class, errors=[])
	@errors = errors if !errors.empty?
	raise exception_class
end