Parent

Methods

Class/Module Index [+]

Quicksearch

Celluloid::Incident

Wraps all events and context for a single incident.

Attributes

events[RW]
pid[RW]
triggering_event[RW]

Public Class Methods

new(events, triggering_event=nil) click to toggle source
# File lib/celluloid/logging/incident.rb, line 7
def initialize(events, triggering_event=nil)
  @events = events
  @triggering_event = triggering_event
  @pid = $$
end

Public Instance Methods

merge(*other_incidents) click to toggle source

Merge two incidents together. This may be useful if two incidents occur at the same time.

# File lib/celluloid/logging/incident.rb, line 14
def merge(*other_incidents)
  merged_events = other_incidents.flatten.inject(events) do |events, incident|
    events += incident.events
  end
  Incident.new(merged_events.sort, triggering_event)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.