Class: Tabulatr::Generators::InstallGenerator

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

Constant Summary collapse

@@rootpath =
File.expand_path('../../../../assets/', __FILE__)

Instance Method Summary collapse

Instance Method Details

#copy_imagesObject



34
35
36
37
38
39
# File 'lib/generators/tabulatr/install_generator.rb', line 34

def copy_images
  Dir[@@rootpath+"/images/*"].each do |fname|
    f = File.basename(fname)
    copy_file "images/#{f}", "public/images/tabulatr/#{f}"
  end
end

#copy_stylesheetObject



30
31
32
# File 'lib/generators/tabulatr/install_generator.rb', line 30

def copy_stylesheet
  copy_file 'tabulatr.css', 'public/stylesheets/tabulatr.css'
end


41
42
43
44
45
46
47
48
49
50
# File 'lib/generators/tabulatr/install_generator.rb', line 41

def print_info
  puts %q{--------------------------------------------------------
Please note: We have copied a sample stylesheet to 
  public/stylesheets/tabulatr.css
to actually use it in your application, please include 
it in your layout file. You may use s/th like
  <%= stylesheet_link_tag :tabulatr %>
for that.
--------------------------------------------------------}
end