Class: Gabrake::Collector::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/gabrake/collector.rb

Instance Method Summary collapse

Constructor Details

#initialize(exception) ⇒ Event

Returns a new instance of Event.



29
30
31
# File 'lib/gabrake/collector.rb', line 29

def initialize(exception)
  @exception = exception
end

Instance Method Details

#actionObject



37
38
39
# File 'lib/gabrake/collector.rb', line 37

def action
  @message ||= "#{@exception.class}: #{@exception.message}"
end

#categoryObject



33
34
35
# File 'lib/gabrake/collector.rb', line 33

def category
  'Gabrake (Rails)'
end

#labelObject



41
42
43
# File 'lib/gabrake/collector.rb', line 41

def label
  "#{location.gsub(/\A#{::Rails.root}\//, '')}" if location
end