Module: FontFabulous
- Defined in:
- lib/font-fabulous.rb,
lib/font-fabulous/engine.rb,
lib/font-fabulous/version.rb
Defined Under Namespace
Modules: Rails
Constant Summary collapse
- VERSION =
'1.0.5'.freeze
Class Method Summary collapse
- .assets_path ⇒ Object
- .compass? ⇒ Boolean
- .fonts_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .load! ⇒ Object
- .rails? ⇒ Boolean
- .sprockets? ⇒ Boolean
- .stylesheets_path ⇒ Object
Class Method Details
.assets_path ⇒ Object
28 29 30 |
# File 'lib/font-fabulous.rb', line 28 def assets_path @assets_path ||= File.join(gem_path, 'assets') end |
.compass? ⇒ Boolean
36 37 38 |
# File 'lib/font-fabulous.rb', line 36 def compass? defined?(::Compass::Frameworks) end |
.fonts_path ⇒ Object
24 25 26 |
# File 'lib/font-fabulous.rb', line 24 def fonts_path File.join(assets_path, 'fonts') end |
.gem_path ⇒ Object
Paths
16 17 18 |
# File 'lib/font-fabulous.rb', line 16 def gem_path @gem_path ||= File.('..', File.dirname(__FILE__)) end |
.load! ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/font-fabulous.rb', line 3 def load! register_compass_extension if compass? if rails? register_rails_engine elsif sprockets? register_sprockets end configure_sass end |
.rails? ⇒ Boolean
40 41 42 |
# File 'lib/font-fabulous.rb', line 40 def rails? defined?(::Rails) end |
.sprockets? ⇒ Boolean
32 33 34 |
# File 'lib/font-fabulous.rb', line 32 def sprockets? defined?(::Sprockets) end |
.stylesheets_path ⇒ Object
20 21 22 |
# File 'lib/font-fabulous.rb', line 20 def stylesheets_path File.join(assets_path, 'stylesheets') end |