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.3.6'
- BOOTSTRAP_SHA =
'81df608a40bf0629a1dc08e584849bb1e43e0b7a'
Class Method Summary collapse
- .assets_path ⇒ Object
- .compass? ⇒ Boolean
- .fonts_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .javascripts_path ⇒ Object
-
.load! ⇒ Object
Inspired by Kaminari.
- .lotus? ⇒ Boolean
- .rails? ⇒ Boolean
-
.sprockets? ⇒ Boolean
Environment detection helpers.
- .stylesheets_path ⇒ Object
Class Method Details
.assets_path ⇒ Object
36 37 38 |
# File 'lib/bootstrap-sass.rb', line 36 def assets_path @assets_path ||= File.join gem_path, 'assets' end |
.compass? ⇒ Boolean
45 46 47 |
# File 'lib/bootstrap-sass.rb', line 45 def compass? defined?(::Compass::Frameworks) end |
.fonts_path ⇒ Object
28 29 30 |
# File 'lib/bootstrap-sass.rb', line 28 def fonts_path File.join assets_path, 'fonts' end |
.gem_path ⇒ Object
Paths
20 21 22 |
# File 'lib/bootstrap-sass.rb', line 20 def gem_path @gem_path ||= File. '..', File.dirname(__FILE__) end |
.javascripts_path ⇒ Object
32 33 34 |
# File 'lib/bootstrap-sass.rb', line 32 def javascripts_path File.join assets_path, 'javascripts' end |
.load! ⇒ Object
Inspired by Kaminari
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/bootstrap-sass.rb', line 5 def load! register_compass_extension if compass? if rails? register_rails_engine elsif lotus? register_lotus elsif sprockets? register_sprockets end configure_sass end |
.lotus? ⇒ Boolean
53 54 55 |
# File 'lib/bootstrap-sass.rb', line 53 def lotus? defined?(::Lotus) end |
.rails? ⇒ Boolean
49 50 51 |
# File 'lib/bootstrap-sass.rb', line 49 def rails? defined?(::Rails) end |
.sprockets? ⇒ Boolean
Environment detection helpers
41 42 43 |
# File 'lib/bootstrap-sass.rb', line 41 def sprockets? defined?(::Sprockets) end |
.stylesheets_path ⇒ Object
24 25 26 |
# File 'lib/bootstrap-sass.rb', line 24 def stylesheets_path File.join assets_path, 'stylesheets' end |