Class: Kamigo::EventProcessors::DefaultPathProcessor
- Inherits:
-
Object
- Object
- Kamigo::EventProcessors::DefaultPathProcessor
- Defined in:
- lib/kamigo/event_processors/default_path_processor.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
Returns the value of attribute account.
-
#form_authenticity_token ⇒ Object
Returns the value of attribute form_authenticity_token.
-
#request ⇒ Object
Returns the value of attribute request.
Instance Method Summary collapse
Instance Attribute Details
#account ⇒ Object
Returns the value of attribute account.
6 7 8 |
# File 'lib/kamigo/event_processors/default_path_processor.rb', line 6 def account @account end |
#form_authenticity_token ⇒ Object
Returns the value of attribute form_authenticity_token.
5 6 7 |
# File 'lib/kamigo/event_processors/default_path_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/default_path_processor.rb', line 4 def request @request end |
Instance Method Details
#process(event) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/kamigo/event_processors/default_path_processor.rb', line 8 def process(event) path = @account&.default_path || Kamigo.default_path return nil if path.nil? http_method = @account&.default_http_method || Kamigo.default_http_method reserve_route(URI::Parser.new.escape(path), http_method: http_method, request_params: event.platform_params, format: :line) end |