Module: Blissful::Rails
- Defined in:
- lib/blissful/rails.rb,
lib/blissful/rails/engine.rb,
lib/blissful/rails/version.rb
Defined Under Namespace
Classes: Engine
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
- .assets_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .javascripts_path ⇒ Object
-
.load! ⇒ Object
Loading the heavenly library.
-
.loader_for_rails ⇒ Object
Loader for Rails.
-
.loader_for_sprockets ⇒ Object
Loader for Sprockets.
-
.rails? ⇒ Boolean
Environment detection helpers.
- .sprockets? ⇒ Boolean
Class Method Details
.assets_path ⇒ Object
20 21 22 |
# File 'lib/blissful/rails.rb', line 20 def assets_path @assets_path ||= File.join gem_path, 'assets' end |
.gem_path ⇒ Object
Paths
16 17 18 |
# File 'lib/blissful/rails.rb', line 16 def gem_path @gem_path ||= File. '..', File.dirname(__FILE__) end |
.javascripts_path ⇒ Object
24 25 26 |
# File 'lib/blissful/rails.rb', line 24 def javascripts_path File.join assets_path, 'javascripts' end |
.load! ⇒ Object
Loading the heavenly library
7 8 9 10 11 12 13 |
# File 'lib/blissful/rails.rb', line 7 def load! if rails? loader_for_rails elsif sprockets? loader_for_sprockets end end |
.loader_for_rails ⇒ Object
Loader for Rails
38 39 40 |
# File 'lib/blissful/rails.rb', line 38 def loader_for_rails require 'blissful/rails/engine' end |
.loader_for_sprockets ⇒ Object
Loader for Sprockets
43 44 45 |
# File 'lib/blissful/rails.rb', line 43 def loader_for_sprockets Sprockets.append_path(javascripts_path) end |
.rails? ⇒ Boolean
Environment detection helpers
29 30 31 |
# File 'lib/blissful/rails.rb', line 29 def rails? defined?(::Rails) end |
.sprockets? ⇒ Boolean
33 34 35 |
# File 'lib/blissful/rails.rb', line 33 def sprockets? defined?(::Sprockets) end |