Class: FastTrack::TwitterBootstrap

Inherits:
Track
  • Object
show all
Defined in:
lib/tracks/twitter_bootstrap.rb

Instance Attribute Summary

Attributes inherited from Track

#generator

Instance Method Summary collapse

Methods inherited from Track

before_migrate, before_migrate_block, #create_file, #g, #gem, #gem_group, gemfile, gemfile_block, #generate, #initialize, #rake, #read_file, #route, #run

Methods included from TrackMethods

#bundle_install, #config, #db_migrate!, #migration, #model

Constructor Details

This class inherits a constructor from FastTrack::Track

Instance Method Details

#application_cssObject



23
24
25
# File 'lib/tracks/twitter_bootstrap.rb', line 23

def application_css
  read_file("application.css")
end

#flash_helperObject



19
20
21
# File 'lib/tracks/twitter_bootstrap.rb', line 19

def flash_helper
  read_file("bootstrap_flash_helper.rb")
end

#invokeObject



27
28
29
30
31
32
33
34
35
36
# File 'lib/tracks/twitter_bootstrap.rb', line 27

def invoke
  generate "controller Home index"
  route "root to: 'home#index'"

  generate "bootstrap:install less"
  generate "bootstrap:layout application fixed --force"

  create_file "app/helpers/bootstrap_flash_helper.rb",  flash_helper
  create_file "app/assets/stylesheets/application.css", application_css, force: true
end

#template_directoryObject



15
16
17
# File 'lib/tracks/twitter_bootstrap.rb', line 15

def template_directory
  "twitter_bootstrap"
end