Exception: Exception
- Defined in:
- lib/assay/ae/core_ext.rb
Direct Known Subclasses
Class Method Summary collapse
-
.raised? ⇒ Boolean
Does the block raise this exception, or a kind of it?.
Instance Method Summary collapse
-
#negative? ⇒ Boolean
Was the assertion that raised this exception a negated one?.
-
#set_negative(boolean) ⇒ Object
Set whether the exception came from a negated assertion.
Class Method Details
.raised? ⇒ Boolean
Does the block raise this exception, or a kind of it?
130 131 132 133 134 135 |
# File 'lib/assay/ae/core_ext.rb', line 130 def self.raised? #:yield: yield false rescue self true end |
Instance Method Details
#negative? ⇒ Boolean
Was the assertion that raised this exception a negated one?
138 139 140 |
# File 'lib/assay/ae/core_ext.rb', line 138 def negative? @negative || false end |
#set_negative(boolean) ⇒ Object
Set whether the exception came from a negated assertion.
143 144 145 |
# File 'lib/assay/ae/core_ext.rb', line 143 def set_negative(boolean) @negative = !!boolean end |