Class: IOCheck::Policy::Block
- Inherits:
-
IOCheck::Policy
- Object
- IOCheck::Policy
- IOCheck::Policy::Block
- Defined in:
- lib/iocheck/policy.rb
Instance Attribute Summary
Attributes inherited from IOCheck::Policy
Instance Method Summary collapse
- #evaluate(test) ⇒ Object
-
#initialize(&blk) ⇒ Block
constructor
A new instance of Block.
Methods inherited from IOCheck::Policy
by_bytes, by_bytes_log, #run!, succeed_if
Constructor Details
#initialize(&blk) ⇒ Block
Returns a new instance of Block.
29 30 31 32 |
# File 'lib/iocheck/policy.rb', line 29 def initialize(&blk) super @blk = blk end |
Instance Method Details
#evaluate(test) ⇒ Object
34 35 36 |
# File 'lib/iocheck/policy.rb', line 34 def evaluate( test ) @blk.call( test ) end |