To collect the pipeline steps, we will register a @pipeline_steps module attribute. But, this time, we will pass the :accumulate option, meaning that every time this module attribute is used, it will append to its current value the value passed to it. When the compilation ends, the @pipeline_steps module attribute will contain a list with all those values, in our case all the pipeline steps:
$ cat apps/elixir_drip/lib/elixir_drip/dsl/pipeliner.exdefmodule ElixirDrip.Pipeliner do # ... defmacro __using__(opts) do # ... IO.puts "Building Pipeliner: #{name}" quote do # ... Module.register_attribute(__MODULE__, :pipeline_steps, accumulate: true) @before_compile unquote(__MODULE__) def show_pipeline_steps do ...