module MirrorMirror

Constants

VERSION

Attributes

flipped_by_default[RW]

Public Class Methods

activate!() click to toggle source
# File lib/mirror-mirror.rb, line 9
def activate!
  require 'mirror-mirror/sass_functions'
  add_to_load_path!
  Sass::Tree::RootNode.send(:include, SassPatch)
  Sass::Tree::Visitors::Cssize.send(:include, CssizePatch)
  Sass::Tree::DirectiveNode.send(:include, DirectiveNodePatch)
end
add_to_load_path!() click to toggle source
# File lib/mirror-mirror.rb, line 17
def add_to_load_path!
  stylesheets_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'stylesheets'))
  begin
    require 'compass'
    Compass::Frameworks.register('mirror-mirror', :stylesheets_directory => stylesheets_path)
  rescue LoadError
    # compass not found, register on the Sass path via the environment.
    if ENV.has_key?("SASS_PATH")
      ENV["SASS_PATH"] = ENV["SASS_PATH"] + File::PATH_SEPARATOR + stylesheets_path
    else
      ENV["SASS_PATH"] = stylesheets_path
    end
  end
end