class
AzuCLI::Generate::Service
- AzuCLI::Generate::Service
- Teeplate::FileTree
- Reference
- Object
Overview
Service generator for business logic with CRUD actions
Defined in:
azu_cli/generators/service.crConstant Summary
-
OUTPUT_DIR =
"./src/services"
Constructors
Instance Method Summary
-
#____collect_files(____files)
:nodoc:
- #__ecr0(____io)
- #__ecr2(____io)
- #__ecr4(____io)
- #__ecr7(____io)
- #__ecr9(____io)
- #action : String
- #action=(action : String)
- #attributes : Hash(String, String)
- #attributes=(attributes : Hash(String, String))
- #camel_case_name : String
-
#constructor_params : String
Generate constructor parameters for model
-
#crystal_type(attr_type : String) : String
Get Crystal type for attribute
-
#full_module_name : String
Get the full nested module name for the service
- #generate_create_service_content : String
- #generate_destroy_service_content : String
- #generate_index_service_content : String
-
#generate_result_concern(output_dir : String, force : Bool = false)
Helper method to generate Result concern directly
-
#generate_service_file(output_dir : String, force : Bool = false)
Helper method to generate service files directly
- #generate_show_service_content : String
- #generate_update_service_content : String
-
#id_type : String
Determine ID type based on database configuration or default to Int64
- #model_class : String
- #module_name : String
- #module_name=(module_name : String)
- #name : String
- #name=(name : String)
-
#param_list : String
Generate parameter list from attributes
-
#render(output_dir : String, force : Bool = false, interactive : Bool = true, list : Bool = false, color : Bool = false)
Override render to generate one file per action + Result concern
- #resource_plural : String
- #resource_plural=(resource_plural : String)
- #service_class_name : String
- #snake_case_name : String
- #snake_case_name=(snake_case_name : String)
-
#update_params : String
Generate update parameters hash
Constructor Detail
def self.new(name : String, action : String = "create", attributes : Hash(String, String) = {} of String => String)
#
Instance Method Detail
def generate_result_concern(output_dir : String, force : Bool = false)
#
Helper method to generate Result concern directly
def generate_service_file(output_dir : String, force : Bool = false)
#
Helper method to generate service files directly
def render(output_dir : String, force : Bool = false, interactive : Bool = true, list : Bool = false, color : Bool = false)
#
Override render to generate one file per action + Result concern