Module: Remap::Catchable Private
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #catch_fatal(state, backtrace) {|state, id| ... } ⇒ State<T> private
- #catch_ignored(state) {|state, id| ... } ⇒ State<T> private
Instance Method Details
#catch_fatal(state, backtrace) {|state, id| ... } ⇒ State<T>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 35 36 37 38 39 40 |
# File 'lib/remap/catchable.rb', line 32 def catch_fatal(state, backtrace, &block) id = to_id(:fatal) failure = catch(id) do return block[state.set(fatal_id: id), fatal_id: id].remove_fatal_id end raise failure.exception(backtrace) end |
#catch_ignored(state) {|state, id| ... } ⇒ State<T>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 18 19 20 21 |
# File 'lib/remap/catchable.rb', line 15 def catch_ignored(state, &block) id = to_id(:ignored) catch(id) do block[state.set(id: id), id: id].remove_id end end |