Class: Xmvc::Generator::Layout

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/xmvc/generators/layout.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



11
12
13
14
# File 'lib/xmvc/generators/layout.rb', line 11

def self.source_root
  puts "source_root"
  "."
end

Instance Method Details

#buildObject



18
19
20
21
22
# File 'lib/xmvc/generators/layout.rb', line 18

def build
  @javascripts = Jammit.packager.individual_urls("application", :js).map {|file| Generator.script_tag(file) }.join("\n")
  
  template("#{Generator::TEMPLATE_PATH}/layout.html.erb", 'layout.html')
end