Module: Bootstrap
- Defined in:
- lib/bootstrap.rb,
lib/bootstrap/engine.rb,
lib/bootstrap/version.rb
Defined Under Namespace
Modules: Rails
Constant Summary collapse
- VERSION =
'4.1.1'
- BOOTSTRAP_SHA =
'779ad9f174ea5ab7e755f6df0ec9e5912d67dd16'
Class Method Summary collapse
- .assets_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .hanami? ⇒ Boolean
- .javascripts_path ⇒ Object
-
.load! ⇒ Object
Inspired by Kaminari.
- .rails? ⇒ Boolean
-
.sprockets? ⇒ Boolean
Environment detection helpers.
- .stylesheets_path ⇒ Object
Class Method Details
.assets_path ⇒ Object
32 33 34 |
# File 'lib/bootstrap.rb', line 32 def assets_path @assets_path ||= File.join gem_path, 'assets' end |
.gem_path ⇒ Object
Paths
20 21 22 |
# File 'lib/bootstrap.rb', line 20 def gem_path @gem_path ||= File. '..', File.dirname(__FILE__) end |
.hanami? ⇒ Boolean
45 46 47 |
# File 'lib/bootstrap.rb', line 45 def hanami? defined?(::Hanami) end |
.javascripts_path ⇒ Object
28 29 30 |
# File 'lib/bootstrap.rb', line 28 def javascripts_path File.join assets_path, 'javascripts' end |
.load! ⇒ Object
Inspired by Kaminari
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/bootstrap.rb', line 7 def load! if rails? register_rails_engine elsif hanami? register_hanami elsif sprockets? register_sprockets end configure_sass end |
.rails? ⇒ Boolean
41 42 43 |
# File 'lib/bootstrap.rb', line 41 def rails? defined?(::Rails) end |
.sprockets? ⇒ Boolean
Environment detection helpers
37 38 39 |
# File 'lib/bootstrap.rb', line 37 def sprockets? defined?(::Sprockets) end |
.stylesheets_path ⇒ Object
24 25 26 |
# File 'lib/bootstrap.rb', line 24 def stylesheets_path File.join assets_path, 'stylesheets' end |