class

AzuCLI::Generate::Component

Inherits Teeplate::FileTree < Reference < Object

Component generator that creates Azu::Component classes

Constants

OUTPUT_DIR = "./src/components"

Constructors

new(name : String, properties : Hash(String, String) = {} of String => String, events : Array(String) = [] of String)
Source

Instance methods

____collect_files(____files)

:nodoc:

Source
__ecr0(____io)
Source
class_name

Convert name to component class name

Source
constructor_params

Get constructor parameters

Source
crystal_type(prop_type : String) : String

Get Crystal type for property

Source
default_value(prop_type : String) : String

Get default value for property type

Source
event_handling_method

Get event handling method

Source
events
Source
events=(events : Array(String))
Source
has_default_value?(prop_type : String) : Bool

Check if type has a default value

Source
has_events?

Check if component has events

Source
has_properties?

Check if component has properties

Source
name
Source
name=(name : String)
Source
properties
Source
properties=(properties : Hash(String, String))
Source
property_declarations

Get property declarations

Source
snake_case_name
Source
snake_case_name=(snake_case_name : String)
Source