Class: RailsLiveDashboard::Recorders::RequestRecorder

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_live_dashboard/recorders/request_recorder.rb

Instance Method Summary collapse

Constructor Details

#initialize(event) ⇒ RequestRecorder

Returns a new instance of RequestRecorder.



4
5
6
# File 'lib/rails_live_dashboard/recorders/request_recorder.rb', line 4

def initialize(event)
  @event = event
end

Instance Method Details

#executeObject



8
9
10
11
12
13
# File 'lib/rails_live_dashboard/recorders/request_recorder.rb', line 8

def execute
  Request.create(
    batch_id: RailsLiveDashboard::Context.instance.batch_id,
    content: build_content
  )
end