Module: CrashReporter::DSL
- Defined in:
- lib/crash_reporter/dsl.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
25 26 27 |
# File 'lib/crash_reporter/dsl.rb', line 25 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#capture_errors(&block) ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/crash_reporter/dsl.rb', line 29 def capture_errors(&block) begin yield rescue StandardError => e report_crash(e) raise e end end |
#report_crash(data) ⇒ Object
39 40 41 |
# File 'lib/crash_reporter/dsl.rb', line 39 def report_crash(data) CrashReporter.report(data) end |