Class: Kamigo::EventProcessors::DefaultPathProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/kamigo/event_processors/default_path_processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accountObject

Returns the value of attribute account.



6
7
8
# File 'lib/kamigo/event_processors/default_path_processor.rb', line 6

def 
  @account
end

#form_authenticity_tokenObject

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

#requestObject

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