Module: Mice
- Defined in:
- lib/mice.rb,
lib/mice/engine.rb,
lib/mice/version.rb
Overview
Mice.load!
Defined Under Namespace
Modules: Rails
Constant Summary collapse
- VERSION =
"0.2.14"
Class Method Summary collapse
-
.asset_pipeline? ⇒ Boolean
Environment detection helpers.
- .assets_path ⇒ Object
- .compass? ⇒ Boolean
- .fonts_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .javascripts_path ⇒ Object
-
.load! ⇒ Object
Inspired by Kaminari.
- .rails? ⇒ Boolean
- .stylesheets_path ⇒ Object
Class Method Details
.asset_pipeline? ⇒ Boolean
Environment detection helpers
55 56 57 |
# File 'lib/mice.rb', line 55 def asset_pipeline? defined?(::Sprockets) end |
.assets_path ⇒ Object
50 51 52 |
# File 'lib/mice.rb', line 50 def assets_path @assets_path ||= File.join gem_path, 'assets' end |
.compass? ⇒ Boolean
59 60 61 |
# File 'lib/mice.rb', line 59 def compass? defined?(::Compass) end |
.fonts_path ⇒ Object
42 43 44 |
# File 'lib/mice.rb', line 42 def fonts_path File.join assets_path, 'fonts' end |
.gem_path ⇒ Object
Paths
34 35 36 |
# File 'lib/mice.rb', line 34 def gem_path @gem_path ||= File. '..', File.dirname(__FILE__) end |
.javascripts_path ⇒ Object
46 47 48 |
# File 'lib/mice.rb', line 46 def javascripts_path File.join assets_path, 'javascripts' end |
.load! ⇒ Object
Inspired by Kaminari
23 24 25 26 27 28 29 30 31 |
# File 'lib/mice.rb', line 23 def load! register_compass_extension if compass? if rails? register_rails_engine end configure_sass end |
.rails? ⇒ Boolean
63 64 65 |
# File 'lib/mice.rb', line 63 def rails? defined?(::Rails) end |
.stylesheets_path ⇒ Object
38 39 40 |
# File 'lib/mice.rb', line 38 def stylesheets_path File.join assets_path, 'stylesheets' end |