Class: Restartable
- Inherits:
-
Object
- Object
- Restartable
- Defined in:
- lib/restartable.rb
Overview
Main interface
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}, &block) ⇒ Restartable
constructor
A new instance of Restartable.
Constructor Details
#initialize(options = {}, &block) ⇒ Restartable
Returns a new instance of Restartable.
18 19 20 21 22 |
# File 'lib/restartable.rb', line 18 def initialize( = {}, &block) @on_restart = Array([:on_restart]) @block = block run! end |
Class Method Details
.version ⇒ Object
12 13 14 15 16 |
# File 'lib/restartable.rb', line 12 def self.version Gem.loaded_specs['restartable'].version.to_s rescue 'DEV' end |