Method: PirateGame::Animation#wrap_block
- Defined in:
- lib/pirate_game/animation.rb
#wrap_block(block) ⇒ Object
Wraps block
in an exception handler that switches to the select_game_screen.
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/pirate_game/animation.rb', line 22 def wrap_block block # :nodoc: proc do |*args| begin block.call(*args) rescue DRb::DRbConnError @app.state = :select_game @app.select_game_screen end end end |