AzuCLI::Generate::Page
Inherits Teeplate::FileTree < Reference < Object
Page generator that creates Azu::Response structs for both Web and API projects
Constants
OUTPUT_DIR = "./src/pages"
Constructors
new(name : String, fields : Hash(String, String) = {} of String => String, action : String = "index", project_type : String = "web", from_type : String | Nil = nil)
SourceClass methods
output_dir_for_type(project_type : String) : String
Get the appropriate output directory based on project type API projects use ./src/responses, web projects use ./src/pages
Instance methods
__ecr0(____io)
Source__ecr2(____io)
Sourceaction
Sourceaction=(action : String)
Sourcefields
Sourcefields=(fields : Hash(String, String))
Sourcefrom_type
Sourcefrom_type=(from_type : String | Nil)
Sourcegenerate_template
Sourcegenerate_template=(generate_template : Bool)
Sourcemodule_name
Sourcemodule_name=(module_name : String)
Sourcename
Sourcename=(name : String)
Sourceproject_type
Sourceproject_type=(project_type : String)
Sourcerender(output_dir : String, force : Bool = false, interactive : Bool = true, list : Bool = false, color : Bool = false)
Sourceresource
Sourceresource=(resource : String)
Sourceresource_plural
Sourceresource_plural=(resource_plural : String)
Sourceresource_singular
Sourceresource_singular=(resource_singular : String)
Sourcesnake_case_name
Sourcesnake_case_name=(snake_case_name : String)
Sourcestruct_name
Convert name to page response struct name based on project type (nested under resource module)
template_generator=(template_generator : AzuCLI::Generate::Template)
Also generate Jinja2 HTML templates for web projects