Module: MagicStylez
- Defined in:
- lib/magic_stylez.rb,
lib/magic_stylez/engine.rb,
lib/magic_stylez/version.rb,
lib/generators/magic_stylez/update_generator.rb,
lib/generators/magic_stylez/install_generator.rb
Overview
Code from twbs/bootstrap/sas
Defined Under Namespace
Modules: Generators, Rails
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
-
.asset_pipeline? ⇒ Boolean
Environment detection helpers.
- .assets_path ⇒ Object
- .fonts_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .javascripts_path ⇒ Object
-
.load! ⇒ Object
Inspired by Kaminari.
- .rails? ⇒ Boolean
- .stylesheets_path ⇒ Object
Class Method Details
.asset_pipeline? ⇒ Boolean
Environment detection helpers
35 36 37 |
# File 'lib/magic_stylez.rb', line 35 def asset_pipeline? defined?(::Sprockets) end |
.assets_path ⇒ Object
30 31 32 |
# File 'lib/magic_stylez.rb', line 30 def assets_path @assets_path ||= File.join gem_path, 'vendor', 'assets' end |
.fonts_path ⇒ Object
22 23 24 |
# File 'lib/magic_stylez.rb', line 22 def fonts_path File.join assets_path, 'fonts' end |
.gem_path ⇒ Object
Paths
14 15 16 |
# File 'lib/magic_stylez.rb', line 14 def gem_path @gem_path ||= File. '..', File.dirname(__FILE__) end |
.javascripts_path ⇒ Object
26 27 28 |
# File 'lib/magic_stylez.rb', line 26 def javascripts_path File.join assets_path, 'javascripts' end |
.load! ⇒ Object
Inspired by Kaminari
7 8 9 10 11 |
# File 'lib/magic_stylez.rb', line 7 def load! if rails? register_rails_engine end end |
.rails? ⇒ Boolean
39 40 41 |
# File 'lib/magic_stylez.rb', line 39 def rails? defined?(::Rails) end |
.stylesheets_path ⇒ Object
18 19 20 |
# File 'lib/magic_stylez.rb', line 18 def stylesheets_path File.join assets_path, 'stylesheets' end |