Sha256: 84eb2e7282ed65a9d8513c509fc7181d82fcd8eb9cc0fb496582d57c7cf40019

Contents?: true

Size: 1.36 KB

Versions: 1

Compression:

Stored size: 1.36 KB

Contents

require 'active_support/all'
require 'facades/version'

module Facades
  extend self
  autoload :Helpers,  'facades/helpers'
  autoload :Patterns, 'facades/patterns'
  
  
  ##
  # Path to the app dir for the Rails Engine
  # 
  def app_path
    File.expand_path("../../app", __FILE__)
  end
  
  
  ##
  # Accessor for the config
  # 
  def config
    return Config unless block_given?
    yield Config
  end
  
  
  ##
  # Path to any relevant Rails views
  # 
  def view_path
    File.join(File.expand_path("../../app", __FILE__), 'views')
  end
  
  
  ##
  # Where to load the SASS files.
  # 
  def scss_path
    File.join(File.expand_path("../../src", __FILE__), 'scss')
  end
  
  
  ##
  # Where image assets are stored.
  # 
  def image_path
    File.join(File.expand_path("../../src", __FILE__), 'images')
  end
  
  
  ##
  # Icon data for available icon packs
  # 
  def icon_packs
    @icon_packs ||= ActiveSupport::HashWithIndifferentAccess.new
  end
  
  
  ##
  # Where to find icon data
  # 
  def icon_path
    File.join(File.expand_path("../../src", __FILE__), 'icons')
  end
end

require 'facades/config'
require 'facades/sass_extensions'


##
# Use the rails pipeline directly unless functioning 
# in a non-rails environment. Otherwise include the
# compass extension.
# 
if defined?(Rails)
  require 'facades/support/rails'
else
  require 'facades/support/compass'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facades-1.1.0 lib/facades.rb