Class: SeeingIsBelieving::HardCoreEnsure

Inherits:
Object
  • Object
show all
Defined in:
lib/seeing_is_believing/hard_core_ensure.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ HardCoreEnsure

Returns a new instance of HardCoreEnsure.



7
8
9
10
# File 'lib/seeing_is_believing/hard_core_ensure.rb', line 7

def initialize(options)
  self.options = options
  validate_options
end

Class Method Details

.call(options) ⇒ Object



3
4
5
# File 'lib/seeing_is_believing/hard_core_ensure.rb', line 3

def self.call(options)
  new(options).call
end

Instance Method Details

#callObject



12
13
14
15
16
17
# File 'lib/seeing_is_believing/hard_core_ensure.rb', line 12

def call
  trap_sigint
  invoke_code
ensure
  invoke_ensure
end