Module: Bootstrap
- Defined in:
- lib/bootstrap-sass.rb,
lib/bootstrap-sass/engine.rb
Defined Under Namespace
Modules: Rails Classes: FrameworkNotFound
Class Method Summary collapse
-
.load! ⇒ Object
Inspired by Kaminari.
Class Method Details
.load! ⇒ Object
Inspired by Kaminari
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/bootstrap-sass.rb', line 5 def self.load! if rails? require 'sass-rails' # See: https://github.com/thomas-mcdonald/bootstrap-sass/pull/4 require 'bootstrap-sass/engine' elsif compass? require 'bootstrap-sass/compass_extensions' base = File.join(File.dirname(__FILE__), '..') styles = File.join(base, 'vendor', 'assets', 'stylesheets') templates = File.join(base, 'templates') ::Compass::Frameworks.register('bootstrap', :stylesheets_directory => styles, :templates_directory => templates) else raise Bootstrap::FrameworkNotFound, "bootstrap-sass requires either Rails or Compass, neither of which are loaded" end end |