Class: Kamigo::EventProcessors::RailsRouterProcessor
- Inherits:
-
Object
- Object
- Kamigo::EventProcessors::RailsRouterProcessor
- Defined in:
- lib/kamigo/event_processors/rails_router_processor.rb
Instance Attribute Summary collapse
-
#form_authenticity_token ⇒ Object
Returns the value of attribute form_authenticity_token.
-
#request ⇒ Object
Returns the value of attribute request.
Instance Method Summary collapse
-
#initialize ⇒ RailsRouterProcessor
constructor
A new instance of RailsRouterProcessor.
- #process(event) ⇒ Object
Constructor Details
#initialize ⇒ RailsRouterProcessor
Returns a new instance of RailsRouterProcessor.
7 8 |
# File 'lib/kamigo/event_processors/rails_router_processor.rb', line 7 def initialize end |
Instance Attribute Details
#form_authenticity_token ⇒ Object
Returns the value of attribute form_authenticity_token.
5 6 7 |
# File 'lib/kamigo/event_processors/rails_router_processor.rb', line 5 def form_authenticity_token @form_authenticity_token end |
#request ⇒ Object
Returns the value of attribute request.
4 5 6 |
# File 'lib/kamigo/event_processors/rails_router_processor.rb', line 4 def request @request end |
Instance Method Details
#process(event) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/kamigo/event_processors/rails_router_processor.rb', line 10 def process(event) http_method, path, request_params = kamiform_context(event) http_method, path, request_params = language_understanding(event.) if http_method.nil? return nil if http_method.nil? || path.nil? encoded_path = URI::Parser.new.escape(path) request_params = event.platform_params.merge(request_params) output = reserve_route(encoded_path, http_method: http_method, request_params: request_params, format: :line) return output if output.present? end |