Class: Gabrake::Collector::Event
- Inherits:
-
Object
- Object
- Gabrake::Collector::Event
- Defined in:
- lib/gabrake/collector.rb
Instance Method Summary collapse
- #action ⇒ Object
- #category ⇒ Object
-
#initialize(exception) ⇒ Event
constructor
A new instance of Event.
- #label ⇒ Object
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
#action ⇒ Object
37 38 39 |
# File 'lib/gabrake/collector.rb', line 37 def action @message ||= "#{@exception.class}: #{@exception.}" end |
#category ⇒ Object
33 34 35 |
# File 'lib/gabrake/collector.rb', line 33 def category 'Gabrake (Rails)' end |
#label ⇒ Object
41 42 43 |
# File 'lib/gabrake/collector.rb', line 41 def label "#{location.gsub(/\A#{::Rails.root}\//, '')}" if location end |