 defmodule WhiteBread.Context do
-  
+
   alias WhiteBread.Context.StepMacroHelpers
   alias WhiteBread.Context.StepExecutor
 

        def finalize(_ignored_state), do: nil
      end

      defp apply_to_sub_modules(function) do
        @sub_context_modules
        |> Enum.map(fn(sub_module) -> apply(sub_module, function, []) end)
        |> Enum.flat_map(fn(x) -> x end)
      end

    end
  end


    quote do
      @scenario_finalize_defined true
      def finalize(state) do
        cond do
          is_function(unquote(function), 1)
            -> unquote(function).(state)
          is_function(unquote(function), 0)
            -> unquote(function).()
        end
      end
    end
