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.3.6'
BOOTSTRAP_SHA =
'81df608a40bf0629a1dc08e584849bb1e43e0b7a'

Class Method Summary collapse

Class Method Details

.assets_pathObject



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

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

.compass?Boolean

Returns:

  • (Boolean)


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

def compass?
  defined?(::Compass::Frameworks)
end

.fonts_pathObject



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

def fonts_path
  File.join assets_path, 'fonts'
end

.gem_pathObject

Paths



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

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

.javascripts_pathObject



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

def javascripts_path
  File.join assets_path, 'javascripts'
end

.load!Object

Inspired by Kaminari



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

def load!
  register_compass_extension if compass?

  if rails?
    register_rails_engine
  elsif lotus?
    register_lotus
  elsif sprockets?
    register_sprockets
  end

  configure_sass
end

.lotus?Boolean

Returns:

  • (Boolean)


53
54
55
# File 'lib/bootstrap-sass.rb', line 53

def lotus?
  defined?(::Lotus)
end

.rails?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/bootstrap-sass.rb', line 49

def rails?
  defined?(::Rails)
end

.sprockets?Boolean

Environment detection helpers

Returns:

  • (Boolean)


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

def sprockets?
  defined?(::Sprockets)
end

.stylesheets_pathObject



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

def stylesheets_path
  File.join assets_path, 'stylesheets'
end