Class: RailsBand::ActiveRecord::Event::Instantiation

Inherits:
BaseEvent
  • Object
show all
Defined in:
lib/rails_band/active_record/event/instantiation.rb

Overview

A wrapper for the event that is passed to instantiation.active_record.

Instance Attribute Summary

Attributes inherited from BaseEvent

#allocations, #cpu_time, #duration, #end, #idle_time, #name, #time, #transaction_id

Instance Method Summary collapse

Methods inherited from BaseEvent

#initialize, #slice, #to_h

Constructor Details

This class inherits a constructor from RailsBand::BaseEvent

Instance Method Details

#class_name ⇒ Object



12
13
14
# File 'lib/rails_band/active_record/event/instantiation.rb', line 12

def class_name
  @class_name ||= @event.payload.fetch(:class_name)
end

#record_count ⇒ Object



8
9
10
# File 'lib/rails_band/active_record/event/instantiation.rb', line 8

def record_count
  @record_count ||= @event.payload.fetch(:record_count)
end