Packages

Execute a user-written script to create a repeatable demo scenario

Current section

Files

Jump to
demo_gen lib demogen.ex
Raw

lib/demogen.ex

defmodule DemoGen do
defmacro __using__(opts) do
quote do
@behaviour DemoGen.Command
# Get command name from options
@demogen_command_name Keyword.fetch!(unquote(opts), :command_name) |> String.to_atom()
def demogen_command_name, do: @demogen_command_name
end
end
end