Module: Verifier

Defined in:
lib/verifier.rb,
lib/verifier/scope.rb,
lib/verifier/version.rb,
lib/verifier/exceptions.rb,
lib/verifier/verification.rb

Overview

Exceptions raised by Verifier#verify method

Defined Under Namespace

Classes: Scope, Verification

Constant Summary collapse

VERSION =

The semantic version of the module.

"0.0.1".freeze
Invalid =

Exception raised when a verification fails

Class.new ::RuntimeError
MethodFails =

Exception raised when calling a verified method raises a StandardError

Class.new ::RuntimeError
MethodNotDefined =

Exception raised when a verified method is not defined

Class.new ::NameError

Instance Method Summary collapse

Instance Method Details

#verify(method, name, &block) { ... } ⇒ undefined

Runs a verification

Parameters:

  • method (Symbol)

    the name of the method to be verified

  • name (Symbol)

    the name of verification

  • block (Proc)

Yields:

  • block in the scope of a value returned by the method

Returns:

  • (undefined)

Raises:



48
49
50
# File 'lib/verifier.rb', line 48

def verify(method, name, &block)
  Verification.run(self, method, name, &block)
end