Module: Hint

Defined in:
lib/hint.rb,
lib/hint/engine.rb,
lib/hint/version.rb

Defined Under Namespace

Modules: Rails Classes: FrameworkNotFound

Constant Summary collapse

VERSION =
"1.2.2"

Class Method Summary collapse

Class Method Details

.load!Object

Inspired by Kaminari and bootstrap-sass



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/hint.rb', line 7

def self.load!
  if compass?
    register_compass_extension
  end

  if rails?
    require 'sass-rails'
    register_rails_engine
  end

  if !(rails? || compass?)
    raise Hint::FrameworkNotFound, "hint requires either Rails > 3.1 or Compass, neither of which are loaded"
  end

  stylesheets = File.expand_path(File.join("..", 'vendor', 'assets', 'stylesheets'))
  ::Sass.load_paths << stylesheets
end