module Cactu

Constants

VERSION

Public Class Methods

assets_path() click to toggle source
# File lib/cactu.rb, line 24
def assets_path
  @assets_path ||= File.join gem_path, 'assets'
end
gem_path() click to toggle source

Paths

# File lib/cactu.rb, line 16
def gem_path
  @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
end
load!() click to toggle source
# File lib/cactu.rb, line 5
def load!
  if rails?
    register_rails_engine
  elsif sprockets?
    register_sprockets
  elsif defined?(::Sass) && ::Sass.respond_to?(:load_paths)
    ::Sass.load_paths << stylesheets_path
  end
end
rails?() click to toggle source
# File lib/cactu.rb, line 32
def rails?
  defined?(::Rails)
end
sprockets?() click to toggle source
# File lib/cactu.rb, line 28
def sprockets?
  defined?(::Sprockets)
end
stylesheets_path() click to toggle source
# File lib/cactu.rb, line 20
def stylesheets_path
  File.join assets_path, 'stylesheets'
end

Private Class Methods

register_rails_engine() click to toggle source
# File lib/cactu.rb, line 38
def register_rails_engine
  require 'cactu/engine'
end
register_sprockets() click to toggle source
# File lib/cactu.rb, line 42
def register_sprockets
  Sprockets.append_path(stylesheets_path)
end