Vibe.Generator (vibe v0.1.0)
View SourceGenerates Elixir code snippets and templates.
Summary
Functions
Generate a GenServer template.
Generate a basic module template.
Generate a Supervisor template.
Generate a test module template.
Save generated code to a file.
Functions
Generate a GenServer template.
Parameters
- module_name: String with the module name (e.g., "MyApp.MyServer")
- description: Optional module description
- options: Generation options
Returns
{:ok, code}
- Generated code{:error, message}
- Error during generation
Generate a basic module template.
Parameters
- module_name: String with the module name (e.g., "MyApp.MyModule")
- description: Optional module description
- options: Generation options
Returns
{:ok, code}
- Generated code{:error, message}
- Error during generation
Generate a Supervisor template.
Parameters
- module_name: String with the module name (e.g., "MyApp.MySupervisor")
- description: Optional module description
- options: Generation options
- children: List of child module names to supervise
Returns
{:ok, code}
- Generated code{:error, message}
- Error during generation
Generate a test module template.
Parameters
- module_name: String with the module name to test (e.g., "MyApp.MyModule")
- options: Generation options
Returns
{:ok, code}
- Generated code{:error, message}
- Error during generation
Save generated code to a file.
Parameters
- code: The generated code string
- file_path: Path where to save the file
- options: Save options
Returns
{:ok, file_path}
- File saved successfully{:error, message}
- Error during save