Module: CableX::Channel::Process::Controller
- Included in:
- CableXChannel
- Defined in:
- lib/cable_x/channel/process/controller.rb
Overview
Process controller specific tasks
Instance Method Summary collapse
- #controller_klass ⇒ Object
- #invoke_controller ⇒ Object
- #set_controller ⇒ Object
- #set_controller_hash ⇒ Object
Instance Method Details
#controller_klass ⇒ Object
24 25 26 27 |
# File 'lib/cable_x/channel/process/controller.rb', line 24 def controller_klass controller_klass_name = controller_action_hash[:controller].split('/').map(&:camelize).join('::') "#{controller_klass_name}Controller".constantize end |
#invoke_controller ⇒ Object
13 14 15 16 17 18 |
# File 'lib/cable_x/channel/process/controller.rb', line 13 def invoke_controller set_controller set_request set_response controller_klass.dispatch(controller_action_hash[:action], request, response) end |
#set_controller ⇒ Object
9 10 11 |
# File 'lib/cable_x/channel/process/controller.rb', line 9 def set_controller set_controller_hash end |
#set_controller_hash ⇒ Object
20 21 22 |
# File 'lib/cable_x/channel/process/controller.rb', line 20 def set_controller_hash @controller_action_hash = Rails.application.routes.recognize_path data['path'], { method: data['method'] } end |