Class: Entityjs::Templates

Inherits:
Object
  • Object
show all
Defined in:
lib/entityjs/commands/templates.rb

Class Method Summary collapse

Class Method Details

.generate(args) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/entityjs/commands/templates.rb', line 5

def self.generate(args)
  
  puts "Available Templates:"
  temps = Dir[Entityjs::root+'/templates/*'].sort
  
  temps.each do |i|
    k = i.split('/').pop
    default = ''
    
    if k == Entityjs::default_template
      default = " -default"
    end
    puts "  #{k}#{default}"
  end
  
  puts ""
  puts "Run 'entityjs new [name] [template]'"
  
  return 0
end