Module: Bootstrap

Defined in:
lib/bootstrap-sass.rb,
lib/bootstrap-sass/engine.rb,
lib/bootstrap-sass/version.rb

Defined Under Namespace

Modules: Rails

Constant Summary collapse

VERSION =
'3.1.1.1'
BOOTSTRAP_SHA =
'573ad10a9dba52e4a6f059e63b667f4034ad2b39'

Class Method Summary collapse

Class Method Details

.asset_pipeline?Boolean

Environment detection helpers

Returns:

  • (Boolean)


37
38
39
# File 'lib/bootstrap-sass.rb', line 37

def asset_pipeline?
  defined?(::Sprockets)
end

.assets_pathObject



32
33
34
# File 'lib/bootstrap-sass.rb', line 32

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

.compass?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/bootstrap-sass.rb', line 41

def compass?
  defined?(::Compass)
end

.fonts_pathObject



24
25
26
# File 'lib/bootstrap-sass.rb', line 24

def fonts_path
  File.join assets_path, 'fonts'
end

.gem_pathObject

Paths



16
17
18
# File 'lib/bootstrap-sass.rb', line 16

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

.javascripts_pathObject



28
29
30
# File 'lib/bootstrap-sass.rb', line 28

def javascripts_path
  File.join assets_path, 'javascripts'
end

.load!Object

Inspired by Kaminari



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

def load!
  require 'bootstrap-sass/sass_functions'
  register_compass_extension if compass?

  if rails?
    register_rails_engine
  end

  configure_sass
end

.rails?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/bootstrap-sass.rb', line 45

def rails?
  defined?(::Rails)
end

.stylesheets_pathObject



20
21
22
# File 'lib/bootstrap-sass.rb', line 20

def stylesheets_path
  File.join assets_path, 'stylesheets'
end