class ActiveSupport::Notifications::Event - activesupport-4.2.3 Documentation

# class ActiveSupport::Notifications::Event

### Attributes

children[R]
end[RW]
name[R]
payload[R]
time[R]
transaction_id[R]

### Public Class Methods

new(name, start, ending, transaction_id, payload) click to toggle source

    # File 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

### Public Instance Methods

<<(event) click to toggle source

    # File lib/active_support/notifications/instrumenter.rb, line 64
    def <<(event)
      @children << event
    end

duration() click to toggle source

    # File lib/active_support/notifications/instrumenter.rb, line 60
    def duration
      @duration ||= 1000.0 * (self.end - time)
    end

parent_of?(event) click to toggle source

    # File lib/active_support/notifications/instrumenter.rb, line 68
    def parent_of?(event)
      @children.include? event
    end