15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/middleman_ember_scaffold/generators/generate.rb', line 15
def generate(*args)
type = args[0]
file = args[1]
throw 'not implemented'
case type
when 'model'
mg = ModelGenerator.new
mg.invoke :generate [path, name]
when 'view'
vg = ViewGenerator.new
vg.invoke :generate [path, name]
when 'controller'
cg = ControllerGenerator.new
cg.invoke :generate [path, name]
when 'template'
tg = TemplateGenerator.new
tg.invoke :generate [path, name]
else
puts "Type must be one of the following: [model,view,controller,template]"
end
end
|