Sha256: 91b10e37156f86d057f9e48d094176edf409cf333c83f8b5d5d6169f7c1ab1cb

Contents?: true

Size: 482 Bytes

Versions: 2

Compression:

Stored size: 482 Bytes

Contents

module Vundabar
  module Routing
    class Route
      attr_reader :controller_name, :action, :request
      def initialize(request, klass_and_method)
        @request = request
        @controller_name, @action = klass_and_method
      end

      def dispatcher
        controller = controller_name.to_constant.new(request)
        controller.send(action)
        controller.render(action) unless controller.get_response
        controller.get_response
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vundabar-0.2.0 lib/vundabar/routing/route.rb
vundabar-0.1.0 lib/vundabar/routing/route.rb