Class: RailsLiveDashboard::Recorders::QueryRecorder
- Inherits:
-
Object
- Object
- RailsLiveDashboard::Recorders::QueryRecorder
- Defined in:
- lib/rails_live_dashboard/recorders/query_recorder.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(event) ⇒ QueryRecorder
constructor
A new instance of QueryRecorder.
Constructor Details
#initialize(event) ⇒ QueryRecorder
Returns a new instance of QueryRecorder.
4 5 6 |
# File 'lib/rails_live_dashboard/recorders/query_recorder.rb', line 4 def initialize(event) @event = event end |
Instance Method Details
#execute ⇒ Object
8 9 10 11 12 13 |
# File 'lib/rails_live_dashboard/recorders/query_recorder.rb', line 8 def execute Query.create( batch_id: RailsLiveDashboard::Context.instance.batch_id, content: build_content ) end |