Class: JettyRails::Handler::DelegateOnErrorsResponse

Inherits:
Object
  • Object
show all
Includes:
Java::JavaxServletHttp::HttpServletResponse
Defined in:
lib/jetty_rails/handler/delegate_on_errors_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(original, request) ⇒ DelegateOnErrorsResponse

Returns a new instance of DelegateOnErrorsResponse.



7
8
9
10
# File 'lib/jetty_rails/handler/delegate_on_errors_handler.rb', line 7

def initialize(original, request)
  @original = original
  @request = request
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &blk) ⇒ Object



16
17
18
# File 'lib/jetty_rails/handler/delegate_on_errors_handler.rb', line 16

def method_missing(method, *args, &blk)
  @original.send(method, *args, &blk)
end

Instance Method Details

#sendError(status_code) ⇒ Object



12
13
14
# File 'lib/jetty_rails/handler/delegate_on_errors_handler.rb', line 12

def sendError(status_code)
  @request.handled = false
end