Class: Bail::ReturnBehavior
- Defined in:
- lib/bail/behavior/return_behavior.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
Returns the value of attribute result.
Instance Method Summary collapse
Instance Attribute Details
#result ⇒ Object
Returns the value of attribute result.
6 7 8 |
# File 'lib/bail/behavior/return_behavior.rb', line 6 def result @result end |
Instance Method Details
#run(&block) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/bail/behavior/return_behavior.rb', line 8 def run(&block) yield block result = false rescue Bail::ConditionError => e result = true if not Bail.suppress_output Bail.logger.warn(e.) end ensure return result end |