Class: ShutdownHook
Instance Method Summary collapse
-
#initialize(&block) ⇒ ShutdownHook
constructor
A new instance of ShutdownHook.
- #run ⇒ Object
Constructor Details
#initialize(&block) ⇒ ShutdownHook
Returns a new instance of ShutdownHook.
4 5 6 7 |
# File 'lib/shutdown_kill.rb', line 4 def initialize( &block) super() @block=block end |
Instance Method Details
#run ⇒ Object
8 9 10 |
# File 'lib/shutdown_kill.rb', line 8 def run @block[] end |