Module: FontAwesome::Sass

Defined in:
lib/semantic-fa-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 =
'1.0.0'

Class Method Summary collapse

Class Method Details

.assets_pathObject



29
30
31
# File 'lib/semantic-fa-sass.rb', line 29

def assets_path
  @assets_path ||= File.join(gem_path, 'assets')
end

.compass?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/semantic-fa-sass.rb', line 38

def compass?
  defined?(::Compass)
end

.fonts_pathObject



25
26
27
# File 'lib/semantic-fa-sass.rb', line 25

def fonts_path
  File.join(assets_path, 'fonts')
end

.gem_pathObject

Paths



17
18
19
# File 'lib/semantic-fa-sass.rb', line 17

def gem_path
  @gem_path ||= File.expand_path('..', File.dirname(__FILE__))
end

.load!Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/semantic-fa-sass.rb', line 4

def load!
  register_compass_extension if compass?

  if rails?
    register_rails_engine
  elsif sprockets?
    register_sprockets
  end

  configure_sass
end

.rails?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/semantic-fa-sass.rb', line 42

def rails?
  defined?(::Rails)
end

.sprockets?Boolean

Environment detection helpers

Returns:

  • (Boolean)


34
35
36
# File 'lib/semantic-fa-sass.rb', line 34

def sprockets?
  defined?(::Sprockets)
end

.stylesheets_pathObject



21
22
23
# File 'lib/semantic-fa-sass.rb', line 21

def stylesheets_path
  File.join(assets_path, 'stylesheets')
end