Class: Hajimeru::Generator::JavaScript

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/hajimeru/generator/javascript.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



10
11
12
# File 'lib/hajimeru/generator/javascript.rb', line 10

def self.source_root
  File.join(File.dirname(__FILE__), "templates", "javascript")
end

Instance Method Details

#copy_filesObject



21
22
23
24
25
26
27
28
# File 'lib/hajimeru/generator/javascript.rb', line 21

def copy_files
  [
    "index.html",
    "index.js",
  ].each do |path|
    copy_file(path, "#{name}/#{path}")
  end
end

#create_filesObject



14
15
16
17
18
19
# File 'lib/hajimeru/generator/javascript.rb', line 14

def create_files
  [
  ].each do |path|
    template("#{path}.tt", "#{name}/#{path}")
  end
end