Class: Ruby::Extjs

Inherits:
Thor
  • Object
show all
Defined in:
lib/ruby-extjs.rb

Instance Method Summary collapse

Instance Method Details

#generateObject



26
27
28
29
# File 'lib/ruby-extjs.rb', line 26

def generate 
	@prepare = Prepare.new(nameApp, generateTipo, modulo, opcoes)
	@prepare.verifyArguments
end

#usageObject



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/ruby-extjs.rb', line 32

def usage 
	puts "
/**
*
*	Modo de Usar	
*
*	Model
*		ruby-extjs --g MacielSousa model Contatos id:int
*		contato:string email:string
*
*	Controller
*		ruby-extjs --g MacielSousa controller Contatos
*	 	ch:id dr:contato cb:true
*
*	Store
*		ruby-extjs --g MacielSousa store Contatos 
*
*	View
*		ruby-extjs --g MacielSousa view Contatos id:ch 
*		nome:no email:ve telefone:m_fone
*
*	App
*		ruby-extjs --g MacielSousa app
*
*	Parametros
*	1 - nameApp
*	2 - generateTipo
*		*	app
*		*	controller
*		*	model
*		*	store
*		*	view
*	3 - modulo ~> Nome da tabela Ex.: Contato
*	4 - options 
*
*	*	generateTipo => App
*
*	*	generateTipo => Controller
*		ch:id dr:nome cb: true
*		Obs.:
*			ch 	-> Chave Primaria						
*			dr 	-> Ex.: Deseja deletar: record.get('nome')?
*			cb	-> se o modulo tera um storeCombo
*
*	*	generateTipo => Model
*		id:int nome:string email:string telefone:string
*
*	*	generateTipo => Store
*
*	*	generateTipo => View
*		id:ch nome:no email:ve telefone:m_fone
*
*		Obs.:
*			key 	=> nome do campo
*			values 	=>
*			 no -> sem condincoes
*			 ch -> chave primaria
*			 ve -> valid Email
*			 tp	-> campo de senha
*			 r_{modulo} -> combobox {modulo} => tabela referencia
*			 m_{tipo} -> mascara {tipo} => fone,cep,cpf,cnpj,money
*
**/"
end

#versionObject



21
22
23
# File 'lib/ruby-extjs.rb', line 21

def version
	puts "Ruby-ExtJs: #{RubyExtjs::VERSION}"
end