Marten::CLI::Generator
Inherits Marten::Apps::Association / Reference / Object
Abstract generator.
Generators are classes that operate in the context of the gen management command. They can be leveraged to
generate new abstractions, structures, and files within an existing application.
Constructors
Class methods
Allows to set the name of the generator.
The value set using this method will be used by users when they invoke the generator through the use of the
marten gen management command.
Instance methods
Creates the specified files under the passed application config.
files must be an array of tuples where the first element is the path of the file to create and the second
element is the content of the file.
Creates the specified files under the project's spec folder.
files must be an array of tuples where the first element is the path of the file to create and the second
element is the content of the file.
Prints the warning messages that have been collected during the generator execution.
Returns an array of warning messages that should be printed at the end of the generator execution.