Sha256: 355707f68fb591bcb26d844b515967453ef8114591a3a24fe08e1f2309475c1b
Contents?: true
Size: 1.15 KB
Versions: 4
Compression:
Stored size: 1.15 KB
Contents
module WeatherIcons module Rails class << self def load! if rails? register_rails_engine end if compass? register_compass_extension end end def gem_path @gem_path ||= File.expand_path('..', File.dirname(__FILE__)) end def stylesheets_path File.join(assets_path, 'stylesheets') end def fonts_path File.join(assets_path, 'fonts') end def assets_path @assets_path ||= File.join(gem_path, 'vendor', 'assets') end def compass? defined?(::Compass) end def rails? defined?(::Rails) end private def register_compass_extension ::Compass::Frameworks.register( 'weather-icons', path: gem_path, stylesheets_directory: stylesheets_path, templates_directory: File.join(gem_path, 'templates') ) end def register_rails_engine require 'sass-rails' require 'weather-icons/rails/rails/engine' require 'weather-icons/rails/rails/railtie' end end end end WeatherIcons::Rails.load!
Version data entries
4 entries across 4 versions & 1 rubygems