Class: Hajimeru::Generator::JavaScript
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Hajimeru::Generator::JavaScript
- Includes:
- Thor::Actions
- Defined in:
- lib/hajimeru/generator/javascript.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
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_files ⇒ Object
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_files ⇒ Object
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 |