Class: ActiveSupport::Notifications::Event
Relationships & Source Files | |
Inherits: | Object |
Defined in: | activesupport/lib/active_support/notifications/instrumenter.rb |
Class Method Summary
Instance Attribute Summary
Instance Method Summary
Constructor Details
.new(name, start, ending, transaction_id, payload) ⇒ Event
# File 'activesupport/lib/active_support/notifications/instrumenter.rb', line 50
def initialize(name, start, ending, transaction_id, payload) @name = name @payload = payload.dup @time = start @transaction_id = transaction_id @end = ending @children = [] @duration = nil end
Instance Attribute Details
#children (readonly)
[ GitHub ]# File 'activesupport/lib/active_support/notifications/instrumenter.rb', line 47
attr_reader :name, :time, :transaction_id, :payload, :children
#end (rw)
[ GitHub ]# File 'activesupport/lib/active_support/notifications/instrumenter.rb', line 48
attr_accessor :end
#name (readonly)
[ GitHub ]# File 'activesupport/lib/active_support/notifications/instrumenter.rb', line 47
attr_reader :name, :time, :transaction_id, :payload, :children
#payload (readonly)
[ GitHub ]# File 'activesupport/lib/active_support/notifications/instrumenter.rb', line 47
attr_reader :name, :time, :transaction_id, :payload, :children
#time (readonly)
[ GitHub ]# File 'activesupport/lib/active_support/notifications/instrumenter.rb', line 47
attr_reader :name, :time, :transaction_id, :payload, :children
#transaction_id (readonly)
[ GitHub ]Instance Method Details
#<<(event)
[ GitHub ]# File 'activesupport/lib/active_support/notifications/instrumenter.rb', line 64
def <<(event) @children << event end
#duration
[ GitHub ]
#parent_of?(event) ⇒ Boolean
# File 'activesupport/lib/active_support/notifications/instrumenter.rb', line 68
def parent_of?(event) @children.include? event end