module GIPainter_base

Constants

VERSION

Public Class Methods

assets_path() click to toggle source
# File lib/GIPainter-base.rb, line 21
def assets_path
  @assets_path ||= File.join gem_path, 'assets'
end
compass?() click to toggle source
# File lib/GIPainter-base.rb, line 25
def compass?
  defined?(::Compass::Frameworks)
end
gem_path() click to toggle source

Paths

# File lib/GIPainter-base.rb, line 13
def gem_path
  @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
end
load!() click to toggle source
# File lib/GIPainter-base.rb, line 7
def load!
  register_compass_extension if compass?
  configure_sass
end
stylesheets_path() click to toggle source
# File lib/GIPainter-base.rb, line 17
def stylesheets_path
  File.join assets_path, 'stylesheets'
end

Private Class Methods

configure_sass() click to toggle source
# File lib/GIPainter-base.rb, line 31
def configure_sass
  require 'sass'

  ::Sass.load_paths << stylesheets_path

  ::Sass::Script::Number.precision = [8, ::Sass::Script::Number.precision].max
end
register_compass_extension() click to toggle source
# File lib/GIPainter-base.rb, line 39
def register_compass_extension
  ::Compass::Frameworks.register(
      'GIPainter-base',
      :version               => GIPainter_base::VERSION,
      :path                  => gem_path,
      :stylesheets_directory => stylesheets_path,
      :templates_directory   => File.join(gem_path, 'templates')
  )
end