Module: Bootstrap
- Defined in:
- lib/bootstrap-sass.rb,
lib/bootstrap-sass/engine.rb,
lib/bootstrap-sass/version.rb
Defined Under Namespace
Modules: Rails
Constant Summary collapse
- VERSION =
'3.1.1.0'
- BOOTSTRAP_SHA =
'385fb6898128bbfdc3def581bb92e01818fa0525'
Class Method Summary collapse
-
.asset_pipeline? ⇒ Boolean
Environment detection helpers.
- .assets_path ⇒ Object
- .compass? ⇒ Boolean
- .fonts_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .javascripts_path ⇒ Object
-
.load! ⇒ Object
Inspired by Kaminari.
- .rails? ⇒ Boolean
- .stylesheets_path ⇒ Object
Class Method Details
.asset_pipeline? ⇒ Boolean
Environment detection helpers
38 39 40 |
# File 'lib/bootstrap-sass.rb', line 38 def asset_pipeline? defined?(::Sprockets) end |
.assets_path ⇒ Object
33 34 35 |
# File 'lib/bootstrap-sass.rb', line 33 def assets_path @assets_path ||= File.join gem_path, 'vendor', 'assets' end |
.compass? ⇒ Boolean
42 43 44 |
# File 'lib/bootstrap-sass.rb', line 42 def compass? defined?(::Compass) end |
.fonts_path ⇒ Object
25 26 27 |
# File 'lib/bootstrap-sass.rb', line 25 def fonts_path File.join assets_path, 'fonts' end |
.gem_path ⇒ Object
Paths
17 18 19 |
# File 'lib/bootstrap-sass.rb', line 17 def gem_path @gem_path ||= File. '..', File.dirname(__FILE__) end |
.javascripts_path ⇒ Object
29 30 31 |
# File 'lib/bootstrap-sass.rb', line 29 def javascripts_path File.join assets_path, 'javascripts' end |
.load! ⇒ Object
Inspired by Kaminari
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/bootstrap-sass.rb', line 4 def load! require 'bootstrap-sass/sass_functions' register_compass_extension if compass? if rails? require 'sass-rails' register_rails_engine end configure_sass end |
.rails? ⇒ Boolean
46 47 48 |
# File 'lib/bootstrap-sass.rb', line 46 def rails? defined?(::Rails) end |
.stylesheets_path ⇒ Object
21 22 23 |
# File 'lib/bootstrap-sass.rb', line 21 def stylesheets_path File.join assets_path, 'stylesheets' end |