Module: FailtaleReporter::Configuration
- Included in:
- FailtaleReporter
- Defined in:
- lib/failtale_reporter/configuration.rb
Instance Method Summary collapse
- #api_token(token = nil) ⇒ Object
- #application_root(path = nil) ⇒ Object
- #configure {|_self| ... } ⇒ Object
- #default_reporter(reporter = nil) ⇒ Object
- #ignored_exceptions(*arr) ⇒ Object
- #reportable_exceptions(*arr) ⇒ Object
Instance Method Details
#api_token(token = nil) ⇒ Object
12 13 14 |
# File 'lib/failtale_reporter/configuration.rb', line 12 def api_token(token=nil) @api_token ||= token end |
#application_root(path = nil) ⇒ Object
21 22 23 24 |
# File 'lib/failtale_reporter/configuration.rb', line 21 def application_root(path=nil) @application_root = backtrace_cleaner_regexp(path) if path @application_root end |
#configure {|_self| ... } ⇒ Object
26 27 28 |
# File 'lib/failtale_reporter/configuration.rb', line 26 def configure yield self end |
#default_reporter(reporter = nil) ⇒ Object
16 17 18 19 |
# File 'lib/failtale_reporter/configuration.rb', line 16 def default_reporter(reporter=nil) @default_reporter = reporter if reporter @default_reporter end |
#ignored_exceptions(*arr) ⇒ Object
8 9 10 |
# File 'lib/failtale_reporter/configuration.rb', line 8 def ignored_exceptions(*arr) @ignored_exceptions ||= arr.flatten end |
#reportable_exceptions(*arr) ⇒ Object
3 4 5 6 |
# File 'lib/failtale_reporter/configuration.rb', line 3 def reportable_exceptions(*arr) arr = [Exception] if (arr || []).empty? @reportable_exceptions ||= arr.flatten end |