Class: MobileGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/mobile/mobile_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_htmlObject



7
8
9
# File 'lib/generators/mobile/mobile_generator.rb', line 7

def generate_html
  template "layout.html.erb", "app/views/layouts/#{layout_file.underscore}.html.erb"
end

#generate_stylesheetsObject



11
12
13
14
15
16
17
# File 'lib/generators/mobile/mobile_generator.rb', line 11

def generate_stylesheets
  if options.stylesheets?
    stylesheet_files.each do |css|
      copy_file file_name(css), "public/stylesheets/#{file_name(css)}"
    end
  end
end