Class: Entityjs::Html

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

Class Method Summary collapse

Class Method Details

.generate(name = '') ⇒ Object



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

def self.generate(name='')
  if !Dirc.game?
    return 2
  end
  
  puts "Creating HTML files"

  play = 'play.html'
  test = 'test.html'

  if File.exists?(play) || File.exists?(test)
    return 3
  end
  
  FileUtils.cp Entityjs::public_path+'/'+play, play
  FileUtils.cp Entityjs::public_path+'/'+test, test

  
  puts "Created #{play}"
  puts "Created #{test}"
  
  return 0
end