Method: Bail::RaiseBehavior#run

Defined in:
lib/bail/behavior/raise_behavior.rb

#run(&block) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/bail/behavior/raise_behavior.rb', line 5

def run(&block)
  yield block
rescue Bail::ConditionError => e
  if not Bail.suppress_output
    Bail.logger.warn(e.message)
  end

  raise e
end