Module: Hackathon::Bootstrap
- Defined in:
- lib/hackathon-bootstrap.rb,
lib/hackathon/bootstrap/engine.rb,
lib/hackathon/bootstrap/version.rb
Defined Under Namespace
Modules: Rails
Constant Summary collapse
- VERSION =
"0.0.3"
- PATCHLEVEL =
2
- @@theme =
'default'
Class Method Summary collapse
-
.asset_pipeline? ⇒ Boolean
Environment detection helpers.
- .assets_path ⇒ Object
- .compass? ⇒ Boolean
- .fonts_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .javascripts_path ⇒ Object
- .load! ⇒ Object
- .rails? ⇒ Boolean
- .stylesheets_path ⇒ Object
- .theme ⇒ Object
- .use(theme) ⇒ Object
Class Method Details
.asset_pipeline? ⇒ Boolean
Environment detection helpers
43 44 45 |
# File 'lib/hackathon-bootstrap.rb', line 43 def asset_pipeline? defined?(::Sprockets) end |
.assets_path ⇒ Object
38 39 40 |
# File 'lib/hackathon-bootstrap.rb', line 38 def assets_path @assets_path ||= File.join gem_path, 'assets' end |
.compass? ⇒ Boolean
47 48 49 |
# File 'lib/hackathon-bootstrap.rb', line 47 def compass? defined?(::Compass) end |
.fonts_path ⇒ Object
30 31 32 |
# File 'lib/hackathon-bootstrap.rb', line 30 def fonts_path File.join assets_path, 'fonts' end |
.gem_path ⇒ Object
Paths
22 23 24 |
# File 'lib/hackathon-bootstrap.rb', line 22 def gem_path @gem_path ||= File. '..', File.dirname(__FILE__) end |
.javascripts_path ⇒ Object
34 35 36 |
# File 'lib/hackathon-bootstrap.rb', line 34 def javascripts_path File.join assets_path, 'javascripts' end |
.load! ⇒ Object
7 8 9 10 11 |
# File 'lib/hackathon-bootstrap.rb', line 7 def load! register_compass_extension if compass? register_rails_engine if rails? configure_sass end |
.rails? ⇒ Boolean
51 52 53 |
# File 'lib/hackathon-bootstrap.rb', line 51 def rails? defined?(::Rails) end |
.stylesheets_path ⇒ Object
26 27 28 |
# File 'lib/hackathon-bootstrap.rb', line 26 def stylesheets_path File.join assets_path, 'stylesheets' end |
.theme ⇒ Object
17 18 19 |
# File 'lib/hackathon-bootstrap.rb', line 17 def theme @@theme end |
.use(theme) ⇒ Object
13 14 15 |
# File 'lib/hackathon-bootstrap.rb', line 13 def use theme @@theme = theme end |