Module: Stlr
- Defined in:
- lib/stlr.rb,
lib/stlr/engine.rb,
lib/stlr/version.rb
Defined Under Namespace
Modules: Rails
Constant Summary collapse
- VERSION =
'2.0.0'- STLR_SHA =
'81df608a40bf0629a1dc08e584849bb1e43e0b7a'
Class Method Summary collapse
- .assets_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
-
.load! ⇒ Object
Inspired by Kaminari.
- .rails? ⇒ Boolean
-
.sprockets? ⇒ Boolean
Environment detection helpers.
- .stylesheets_path ⇒ Object
Class Method Details
.assets_path ⇒ Object
24 25 26 |
# File 'lib/stlr.rb', line 24 def assets_path @assets_path ||= File.join gem_path, 'assets' end |
.gem_path ⇒ Object
Paths
16 17 18 |
# File 'lib/stlr.rb', line 16 def gem_path @gem_path ||= File. '..', File.dirname(__FILE__) end |
.load! ⇒ Object
Inspired by Kaminari
5 6 7 8 9 10 11 12 13 |
# File 'lib/stlr.rb', line 5 def load! if rails? register_rails_engine elsif sprockets? register_sprockets end configure_sass end |
.rails? ⇒ Boolean
33 34 35 |
# File 'lib/stlr.rb', line 33 def rails? defined?(::Rails) end |
.sprockets? ⇒ Boolean
Environment detection helpers
29 30 31 |
# File 'lib/stlr.rb', line 29 def sprockets? defined?(::Sprockets) end |
.stylesheets_path ⇒ Object
20 21 22 |
# File 'lib/stlr.rb', line 20 def stylesheets_path File.join assets_path, 'stylesheets' end |