Class: PBatcher::Validator

Inherits:
ProcHandler show all
Defined in:
lib/pbatcher/validator.rb

Instance Attribute Summary collapse

Attributes inherited from Handler

#generator

Instance Method Summary collapse

Methods inherited from ProcHandler

#call, #initialize

Methods inherited from Handler

#initialize

Constructor Details

This class inherits a constructor from PBatcher::ProcHandler

Instance Attribute Details

#methodObject (readonly)

Returns the value of attribute method.



3
4
5
# File 'lib/pbatcher/validator.rb', line 3

def method
  @method
end

Instance Method Details

#valid?(result) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/pbatcher/validator.rb', line 5

def valid?(result)
  !!method.call(result)
end