Module: BootflatRails
- Defined in:
- lib/bootflat-rails.rb,
lib/bootflat-rails/engine.rb,
lib/bootflat-rails/version.rb
Defined Under Namespace
Classes: Engine
Constant Summary collapse
- VERSION =
'0.1.9'
Class Method Summary collapse
-
.asset_pipeline? ⇒ Boolean
Environment detection helpers.
- .assets_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .images_path ⇒ Object
- .javascripts_path ⇒ Object
- .load! ⇒ Object
- .rails? ⇒ Boolean
- .stylesheets_path ⇒ Object
Class Method Details
.asset_pipeline? ⇒ Boolean
Environment detection helpers
36 37 38 |
# File 'lib/bootflat-rails.rb', line 36 def asset_pipeline? defined?(::Sprockets) end |
.assets_path ⇒ Object
31 32 33 |
# File 'lib/bootflat-rails.rb', line 31 def assets_path @assets_path ||= File.join gem_path, 'vendor', 'assets' end |
.gem_path ⇒ Object
Paths
15 16 17 |
# File 'lib/bootflat-rails.rb', line 15 def gem_path @gem_path ||= File. '..', File.dirname(__FILE__) end |
.images_path ⇒ Object
27 28 29 |
# File 'lib/bootflat-rails.rb', line 27 def images_path File.join assets_path, 'images' end |
.javascripts_path ⇒ Object
23 24 25 |
# File 'lib/bootflat-rails.rb', line 23 def javascripts_path File.join assets_path, 'javascripts' end |
.load! ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/bootflat-rails.rb', line 3 def load! require 'bootstrap-sass' if rails? require 'sass-rails' register_rails_engine end configure_sass end |
.rails? ⇒ Boolean
40 41 42 |
# File 'lib/bootflat-rails.rb', line 40 def rails? defined?(::Rails) end |
.stylesheets_path ⇒ Object
19 20 21 |
# File 'lib/bootflat-rails.rb', line 19 def stylesheets_path File.join assets_path, 'stylesheets' end |