Module: Quandl::Command::Task::Reportable
- Extended by:
- ActiveSupport::Concern
- Included in:
- Quandl::Command::Task
- Defined in:
- lib/quandl/command/task/reportable.rb
Instance Method Summary collapse
Instance Method Details
#ask_to_send_crash_reports ⇒ Object
13 14 15 16 17 18 |
# File 'lib/quandl/command/task/reportable.rb', line 13 def ask_to_send_crash_reports if config.send_crash_reports.nil? status = ['y','yes'].include? ask("Do you want to send crash reports if toolbelt fails? (y/n)").to_s.strip.rstrip.downcase config.send_crash_reports = status end end |
#call ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/quandl/command/task/reportable.rb', line 20 def call begin super rescue Exception => err if config.send_crash_reports == true Quandl::Client::Report.create( message: err.to_s, full_message: err.backtrace ) rescue nil end raise $!, "#{$!}", $!.backtrace end end |