module Hootstrap
Constants
- VERSION
Public Class Methods
load()
click to toggle source
# File lib/hootstrap.rb, line 6 def load if rails? register_rails_engine elsif sprockets? register_sprockets end configure_sass end
rails?()
click to toggle source
# File lib/hootstrap.rb, line 16 def rails? defined?(::Rails) end
sprockets?()
click to toggle source
# File lib/hootstrap.rb, line 20 def sprockets? defined?(::Sprockets) end
Private Class Methods
assets_path()
click to toggle source
# File lib/hootstrap.rb, line 49 def assets_path @assets_path ||= File.join(gem_path, 'assets') end
configure_sass()
click to toggle source
# File lib/hootstrap.rb, line 35 def configure_sass require 'sass' ::Sass.load_paths << stylesheets_path end
gem_path()
click to toggle source
# File lib/hootstrap.rb, line 53 def gem_path @gem_path ||= File.expand_path('..', File.dirname(__FILE__)) end
javascripts_path()
click to toggle source
# File lib/hootstrap.rb, line 45 def javascripts_path File.join(assets_path, 'javascripts') end
register_rails_engine()
click to toggle source
# File lib/hootstrap.rb, line 26 def register_rails_engine require 'hootstrap/engine' end
register_sprockets()
click to toggle source
# File lib/hootstrap.rb, line 30 def register_sprockets Sprockets.append_path(stylesheets_path) Sprockets.append_path(javascripts_path) end
stylesheets_path()
click to toggle source
# File lib/hootstrap.rb, line 41 def stylesheets_path File.join(assets_path, 'stylesheets') end