Module: Chroma
- Defined in:
- lib/chroma-js.rb,
lib/chroma-js/engine.rb,
lib/chroma-js/version.rb
Defined Under Namespace
Modules: Rails
Constant Summary collapse
- VERSION =
'1.0.7'
- CHROMA_SHA =
'65c0852b050b58147cff5de5157f061bdabf2bc4'
Class Method Summary collapse
- .assets_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .javascripts_path ⇒ Object
-
.load! ⇒ Object
Based on bootstrap-sass.
- .rails? ⇒ Boolean
-
.sprockets? ⇒ Boolean
Environment detection helpers.
Class Method Details
.assets_path ⇒ Object
22 23 24 |
# File 'lib/chroma-js.rb', line 22 def assets_path @assets_path ||= File.join gem_path, 'assets' end |
.gem_path ⇒ Object
Paths
14 15 16 |
# File 'lib/chroma-js.rb', line 14 def gem_path @gem_path ||= File. '..', File.dirname(__FILE__) end |
.javascripts_path ⇒ Object
18 19 20 |
# File 'lib/chroma-js.rb', line 18 def javascripts_path File.join assets_path, 'javascripts' end |
.load! ⇒ Object
Based on bootstrap-sass
5 6 7 8 9 10 11 |
# File 'lib/chroma-js.rb', line 5 def load! if rails? register_rails_engine elsif sprockets? register_sprockets end end |
.rails? ⇒ Boolean
31 32 33 |
# File 'lib/chroma-js.rb', line 31 def rails? defined?(::Rails) end |
.sprockets? ⇒ Boolean
Environment detection helpers
27 28 29 |
# File 'lib/chroma-js.rb', line 27 def sprockets? defined?(::Sprockets) end |