class Fasta::RoutesMapper
Attributes
action[R]
router[R]
Public Class Methods
new(action, router)
click to toggle source
# File lib/fasta/services/routes_mapper.rb, line 3 def initialize(action, router) @action = action @router = router end
Public Instance Methods
reg(method, route, action_name)
click to toggle source
# File lib/fasta/services/routes_mapper.rb, line 8 def reg(method, route, action_name) router.public_send(method, route, to: action.call(action_name)) end