Module: Cactu
- Defined in:
- lib/cactu.rb,
lib/cactu/engine.rb,
lib/cactu/version.rb
Defined Under Namespace
Modules: Rails
Constant Summary collapse
- VERSION =
"0.20.1"
Class Method Summary collapse
- .assets_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .load! ⇒ Object
- .rails? ⇒ Boolean
- .sprockets? ⇒ Boolean
- .stylesheets_path ⇒ Object
Class Method Details
.assets_path ⇒ Object
24 25 26 |
# File 'lib/cactu.rb', line 24 def assets_path @assets_path ||= File.join gem_path, 'assets' end |
.gem_path ⇒ Object
Paths
16 17 18 |
# File 'lib/cactu.rb', line 16 def gem_path @gem_path ||= File. '..', File.dirname(__FILE__) end |
.load! ⇒ Object
5 6 7 8 9 10 11 12 13 |
# 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? ⇒ Boolean
32 33 34 |
# File 'lib/cactu.rb', line 32 def rails? defined?(::Rails) end |
.sprockets? ⇒ Boolean
28 29 30 |
# File 'lib/cactu.rb', line 28 def sprockets? defined?(::Sprockets) end |
.stylesheets_path ⇒ Object
20 21 22 |
# File 'lib/cactu.rb', line 20 def stylesheets_path File.join assets_path, 'stylesheets' end |