module BootswatchSass

Constants

VERSION

Public Class Methods

assets_path() click to toggle source
# File lib/bootswatch-sass.rb, line 33
def assets_path
  @assets_path ||= File.join(gem_path, 'assets')
end
configure_sass!() click to toggle source
# File lib/bootswatch-sass.rb, line 12
def configure_sass!
  ::Sass.load_paths << stylesheets_path
  ::Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max
end
fonts_path() click to toggle source
# File lib/bootswatch-sass.rb, line 37
def fonts_path
  File.join(assets_path, 'fonts')
end
gem_path() click to toggle source

Paths

# File lib/bootswatch-sass.rb, line 29
def gem_path
  @gem_path ||= File.expand_path('..', File.dirname(__FILE__))
end
javascripts_path() click to toggle source
# File lib/bootswatch-sass.rb, line 41
def javascripts_path
  File.join(assets_path, 'javascripts')
end
load!() click to toggle source

Inspired by bootstrap-sass & kaminari

# File lib/bootswatch-sass.rb, line 7
def load!
  configure_sass!
  register_rails_engine! if rails?
end
rails?() click to toggle source

Environment

# File lib/bootswatch-sass.rb, line 23
def rails?
  defined?(::Rails)
end
register_rails_engine!() click to toggle source
# File lib/bootswatch-sass.rb, line 17
def register_rails_engine!
  require 'bootswatch-sass/engine' if rails?
end
stylesheets_path() click to toggle source
# File lib/bootswatch-sass.rb, line 45
def stylesheets_path
  File.join(assets_path, 'stylesheets')
end