Class: Binding
- Inherits:
-
Object
- Object
- Binding
- Defined in:
- lib/clean-assert/clean-assert.rb
Instance Method Summary collapse
Instance Method Details
#/(expression) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/clean-assert/clean-assert.rb', line 9 def / expression if not eval expression the_caller = /\`([^\']+)\'/.match(caller(1).first) m = "unknown" m = the_caller ? the_caller[1] : m raise "Assertion '#{expression}' not satisfied in #{self.self()}##{m}" end self end |