Class: Lookout::Expect::Object::Context
- Defined in:
- lib/lookout-3.0/expect/object/context.rb
Overview
Context in which expect blocks are evaluated. Plug-ins may add private methods to this class to make them available to expect blocks.
Instance Method Summary collapse
-
#evaluate ⇒ ::Object?
The result of evaluating the block or nil if there’s no block.
-
#initialize(*args, &block) ⇒ Context
constructor
Evaluates BLOCK inside this context, passing ARGS to it, when #evaluated.
Constructor Details
Instance Method Details
#evaluate ⇒ ::Object?
Returns The result of evaluating the block or nil if there’s no block.
14 15 16 |
# File 'lib/lookout-3.0/expect/object/context.rb', line 14 def evaluate instance_exec(*@args, &@block) if @block end |