Class: SafeBlock::Configuration
- Inherits:
-
Object
- Object
- SafeBlock::Configuration
- Defined in:
- lib/safeblock/safeblock.rb
Constant Summary collapse
- VALUES =
:timeout, :threaded, :rescue_block, :ignore_exception
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
46 47 48 49 50 |
# File 'lib/safeblock/safeblock.rb', line 46 def initialize @timeout = 0 @threaded = false @ignore_exception = false end |
Instance Method Details
#to_hash ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/safeblock/safeblock.rb', line 52 def to_hash hash = {} VALUES.each do |value| hash[value] = self.send(value) end hash end |