module SimpleController::Router::Context
Attributes
context[R]
Public Instance Methods
call(route_path, params={})
click to toggle source
Calls superclass method
# File lib/simple_controller/router/context.rb, line 10 def call(route_path, params={}) route_path = parse_route_path(route_path.to_s) super(route_path, params) ensure @context = nil end
Protected Instance Methods
_call(route)
click to toggle source
# File lib/simple_controller/router/context.rb, line 20 def _call(route) route.call params, context, controller_path_block end
parse_route_path(route_path)
click to toggle source
# File lib/simple_controller/router/context.rb, line 24 def parse_route_path(route_path) processors = [] until (extension = File.extname(route_path)).empty? route_path = route_path.chomp(extension) processors << extension[1..-1].to_sym end @context = { processors: processors } route_path end