class AzuCLI::Generate::Component

Overview

Component generator that creates Azu::Component classes

Defined in:

azu_cli/generators/component.cr

Constant Summary

OUTPUT_DIR = "./src/components"

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, properties : Hash(String, String) = {} of String => String, events : Array(String) = [] of String) #

[View source]

Instance Method Detail

def ____collect_files(____files) #
Description copied from class Teeplate::FileTree

:nodoc:


[View source]
def __ecr0(____io) #

[View source]
def class_name : String #

Convert name to component class name


[View source]
def constructor_params : String #

Get constructor parameters


[View source]
def crystal_type(prop_type : String) : String #

Get Crystal type for property


[View source]
def default_value(prop_type : String) : String #

Get default value for property type


[View source]
def event_handling_method : String #

Get event handling method


[View source]
def events : Array(String) #

[View source]
def events=(events : Array(String)) #

[View source]
def has_default_value?(prop_type : String) : Bool #

Check if type has a default value


[View source]
def has_events? : Bool #

Check if component has events


[View source]
def has_properties? : Bool #

Check if component has properties


[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def properties : Hash(String, String) #

[View source]
def properties=(properties : Hash(String, String)) #

[View source]
def property_declarations : String #

Get property declarations


[View source]
def snake_case_name : String #

[View source]
def snake_case_name=(snake_case_name : String) #

[View source]