// Path: src/main/java/com/greghaskins/spectrum/Block.java
// @FunctionalInterface
// public interface Block {
//   void run() throws Throwable;
// }


import com.greghaskins.spectrum.Block;
package com.greghaskins.spectrum.internal.hooks;


/**
 * A hook that will run before something.
 * @see AfterHook
 */
public interface BeforeHook {
  /**
   * Insert the block before the inner.
   * @param block the inner block
   * @return new {@link Hook} which runs the provided block then the inner
   */
  static Hook before(final Block block) {
    return (description, notifier, inner) -> {
      block.run();
// Path: src/main/java/com/greghaskins/spectrum/Block.java
// @FunctionalInterface
// public interface Block {
//   void run() throws Throwable;
// }


// Path: src/main/java/com/greghaskins/spectrum/internal/hooks/BeforeHook.java
import com.greghaskins.spectrum.Block;

package com.greghaskins.spectrum.internal.hooks;


/**
 * A hook that will run before something.
 * @see AfterHook
 */
public interface BeforeHook {
  /**
   * Insert the block before the inner.
   * @param block the inner block
   * @return new {@link Hook} which runs the provided block then the inner
   */
  static Hook before(final Block block) {
    return (description, notifier, inner) -> {
      block.run();
      inner.run();