class RoadForest::TestSupport::DispatcherFacade

Public Class Methods

new(dispatcher) click to toggle source
# File lib/roadforest/test-support/dispatcher-facade.rb, line 11
def initialize(dispatcher)
  @dispatcher = dispatcher
end

Public Instance Methods

dispatch(request, response) click to toggle source
# File lib/roadforest/test-support/dispatcher-facade.rb, line 19
def dispatch(request, response)
  if resource = @dispatcher.find_resource(request, response)
    FSM.new(resource, request, response).run
  else
    ::Webmachine.render_error(404, request, response)
  end
end
method_missing(method, *args, &block) click to toggle source
# File lib/roadforest/test-support/dispatcher-facade.rb, line 15
def method_missing(method, *args, &block)
  @dispatcher.__send__(method, *args, &block)
end