Information about a hook tied to an example and a proc to invoke it.
Constructors
new(proc :
Proc, *, location :
Location |
Nil = nil, label :
Label = nil)
Creates the hook with a proc.
The proc will be called when the hook is invoked.
A location and label can be provided for debugging.
Sourcenew(*, location :
Location |
Nil = nil, label :
Label = nil, &block :
Proc)
Creates the hook with a block.
The block must take a single argument - the current example.
The block will be executed when the hook is invoked.
A location and label can be provided for debugging.
SourceInstance methods
call(example : Example) : Nil
Invokes the hook.
The example refers to the current example.
Sourcelabel
User-defined description of the hook.
Sourcelabel?
User-defined description of the hook.
Sourcelocation
Location of the hook in source code.
Sourcelocation?
Location of the hook in source code.
Sourceto_s(io : IO) : Nil
Produces the string representation of the hook.
Includes the location and label if they're not nil.
Source