Class: ExceptionsBase
- Includes:
- Setup::Store
- Defined in:
- lib/pry-byetypo/exceptions/exceptions_base.rb
Direct Known Subclasses
Exceptions::ActiveRecord::Base, Exceptions::ActiveRecord::StatementInvalid::Handler, Exceptions::NameError::Handler, Exceptions::NameError::UndefinedVariable, Exceptions::NoMethodError
Constant Summary
Constants included from Setup::Store
Setup::Store::DEFAULT_STORE_PATH, Setup::Store::SEVEN_DAYS
Instance Method Summary collapse
Methods included from Setup::Store
#staled_store?, #store, #store_path
Methods inherited from Base
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/pry-byetypo/exceptions/exceptions_base.rb', line 10 def call if can_correct? logger.error("\e[1;31m#{exception}\e[0m") logger.info("\e[1;32mRunning: #{corrected_cmd}\e[0m") pry.eval(corrected_cmd) else Pry::ExceptionHandler.handle_exception(output, exception, pry) end end |