class
AzuCLI::Generate::Component
- AzuCLI::Generate::Component
- Teeplate::FileTree
- Reference
- Object
Overview
Component generator that creates Azu::Component classes
Defined in:
azu_cli/generators/component.crConstant Summary
-
OUTPUT_DIR =
"./src/components"
Constructors
Instance Method Summary
-
#____collect_files(____files)
:nodoc:
- #__ecr0(____io)
-
#class_name : String
Convert name to component class name
-
#constructor_params : String
Get constructor parameters
-
#crystal_type(prop_type : String) : String
Get Crystal type for property
-
#default_value(prop_type : String) : String
Get default value for property type
-
#event_handling_method : String
Get event handling method
- #events : Array(String)
- #events=(events : Array(String))
-
#has_default_value?(prop_type : String) : Bool
Check if type has a default value
-
#has_events? : Bool
Check if component has events
-
#has_properties? : Bool
Check if component has properties
- #name : String
- #name=(name : String)
- #properties : Hash(String, String)
- #properties=(properties : Hash(String, String))
-
#property_declarations : String
Get property declarations
- #snake_case_name : String
- #snake_case_name=(snake_case_name : String)
Constructor Detail
def self.new(name : String, properties : Hash(String, String) = {} of String => String, events : Array(String) = [] of String)
#