Class: IOCheck::Policy::Block

Inherits:
IOCheck::Policy show all
Defined in:
lib/iocheck/policy.rb

Instance Attribute Summary

Attributes inherited from IOCheck::Policy

#result

Instance Method Summary collapse

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