Module: EacRubyGemSupport::Rspec::Helpers::Utils
- Defined in:
- lib/eac_ruby_gem_support/rspec/helpers/utils.rb
Instance Method Summary collapse
-
#capture_error ⇒ StandardError?
If block raises an error, return this error.
Instance Method Details
#capture_error ⇒ StandardError?
Returns If block raises an error, return this error. If not, return nil
.
13 14 15 16 17 18 |
# File 'lib/eac_ruby_gem_support/rspec/helpers/utils.rb', line 13 def capture_error yield nil rescue ::StandardError => e e end |