Module: Materialize::Sass
- Defined in:
- lib/materialize-sass.rb,
lib/materialize-sass/engine.rb,
lib/materialize-sass/version.rb
Defined Under Namespace
Classes: Engine
Constant Summary collapse
- VERSION =
"0.98.1"
Class Method Summary collapse
- .assets_path ⇒ Object
- .fonts_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .javascripts_path ⇒ Object
- .load! ⇒ Object
-
.rails? ⇒ Boolean
def compass? defined?(::Compass) end.
-
.sprockets? ⇒ Boolean
Environment detection helpers.
- .stylesheets_path ⇒ Object
Class Method Details
.assets_path ⇒ Object
35 36 37 |
# File 'lib/materialize-sass.rb', line 35 def assets_path @assets_path ||= File.join gem_path, 'app/assets' end |
.fonts_path ⇒ Object
27 28 29 |
# File 'lib/materialize-sass.rb', line 27 def fonts_path File.join assets_path, 'fonts' end |
.gem_path ⇒ Object
Paths
19 20 21 |
# File 'lib/materialize-sass.rb', line 19 def gem_path @gem_path ||= File. '..', File.dirname(__FILE__) end |
.javascripts_path ⇒ Object
31 32 33 |
# File 'lib/materialize-sass.rb', line 31 def javascripts_path File.join assets_path, 'javascripts' end |
.load! ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/materialize-sass.rb', line 8 def load! #register_compass_extension if compass? if rails? register_rails_engine elsif sprockets? register_sprockets end configure_sass end |
.rails? ⇒ Boolean
def compass?
defined?(::Compass)
end
48 49 50 |
# File 'lib/materialize-sass.rb', line 48 def rails? defined?(::Rails) end |
.sprockets? ⇒ Boolean
Environment detection helpers
40 41 42 |
# File 'lib/materialize-sass.rb', line 40 def sprockets? defined?(::Sprockets) end |
.stylesheets_path ⇒ Object
23 24 25 |
# File 'lib/materialize-sass.rb', line 23 def stylesheets_path File.join assets_path, 'stylesheets' end |