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.2.0.4'
BOOTSTRAP_SHA =
'c068162161154a4b85110ea1e7dd3d7897ce2b72'

Class Method Summary collapse

Class Method Details

.asset_pipeline?Boolean

Environment detection helpers

Returns:

  • (Boolean)


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

def asset_pipeline?
  defined?(::Sprockets)
end

.assets_pathObject



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

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

.compass?Boolean

Returns:

  • (Boolean)


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

def compass?
  defined?(::Compass)
end

.fonts_pathObject



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

def fonts_path
  File.join assets_path, 'fonts'
end

.gem_pathObject

Paths



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

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

.javascripts_pathObject



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

def javascripts_path
  File.join assets_path, 'javascripts'
end

.load!Object

Inspired by Kaminari



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

def load!
  register_compass_extension if compass?

  if rails?
    register_rails_engine
  end

  configure_sass
end

.rails?Boolean

Returns:

  • (Boolean)


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

def rails?
  defined?(::Rails)
end

.stylesheets_pathObject



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

def stylesheets_path
  File.join assets_path, 'stylesheets'
end