Module: FontAwesome::Sass
- Defined in:
- lib/font-awesome-sass.rb,
lib/font_awesome/sass/version.rb,
lib/font_awesome/sass/rails/engine.rb,
lib/font_awesome/sass/rails/helpers.rb,
lib/font_awesome/sass/rails/railtie.rb
Defined Under Namespace
Modules: Rails
Constant Summary collapse
- VERSION =
"6.7.2".freeze
Class Method Summary collapse
- .assets_path ⇒ Object
- .deprecated_sass? ⇒ Boolean
- .fonts_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .load! ⇒ Object
- .rails? ⇒ Boolean
- .sprockets? ⇒ Boolean
- .stylesheets_path ⇒ Object
Class Method Details
.assets_path ⇒ Object
27 28 29 |
# File 'lib/font-awesome-sass.rb', line 27 def assets_path @assets_path ||= File.join(gem_path, 'assets') end |
.deprecated_sass? ⇒ Boolean
39 40 41 42 |
# File 'lib/font-awesome-sass.rb', line 39 def deprecated_sass? # The deprecated `sass` gem: defined?(::Sass) && ::Sass.respond_to?(:load_paths) end |
.fonts_path ⇒ Object
23 24 25 |
# File 'lib/font-awesome-sass.rb', line 23 def fonts_path File.join(assets_path, 'fonts') end |
.gem_path ⇒ Object
Paths
15 16 17 |
# File 'lib/font-awesome-sass.rb', line 15 def gem_path @gem_path ||= File.('..', File.dirname(__FILE__)) end |
.load! ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/font-awesome-sass.rb', line 4 def load! if rails? register_rails_engine elsif sprockets? register_sprockets elsif deprecated_sass? ::Sass.load_paths << stylesheets_path end end |
.rails? ⇒ Boolean
35 36 37 |
# File 'lib/font-awesome-sass.rb', line 35 def rails? defined?(::Rails) end |
.sprockets? ⇒ Boolean
31 32 33 |
# File 'lib/font-awesome-sass.rb', line 31 def sprockets? defined?(::Sprockets) end |
.stylesheets_path ⇒ Object
19 20 21 |
# File 'lib/font-awesome-sass.rb', line 19 def stylesheets_path File.join(assets_path, 'stylesheets') end |