Class: RCheck::Assertions::AbstractAssert
- Defined in:
- lib/rcheck/assertions.rb
Instance Attribute Summary
Attributes inherited from Abstract
Instance Method Summary collapse
-
#initialize(left, op = nil, *right) ⇒ AbstractAssert
constructor
A new instance of AbstractAssert.
Methods inherited from Abstract
Constructor Details
#initialize(left, op = nil, *right) ⇒ AbstractAssert
Returns a new instance of AbstractAssert.
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/rcheck/assertions.rb', line 55 def initialize(left, op=nil, *right) @left = left @op = op @right = right @truth = (@right.empty? && @op.nil?) ? @left : @left.send(@op, *@right) @result = Result.new( status: !!@truth != !!@refute ? :pass : :fail, location: caller(4), introspection: introspection) end |