Module: Tabler::Rubygem
- Defined in:
- lib/tabler/rubygem.rb,
lib/tabler/rubygem/engine.rb,
lib/tabler/rubygem/version.rb
Defined Under Namespace
Modules: Rails
Constant Summary collapse
- VERSION =
'0.1.4'
- TABLER_SHA =
'748028000ba6603090c1f5a741e906b59ed934b2'
Class Method Summary collapse
- .assets_path ⇒ Object
-
.gem_path ⇒ Object
Paths.
- .hanami? ⇒ Boolean
- .javascripts_path ⇒ Object
-
.load! ⇒ Object
Inspired by Kaminari.
- .rails? ⇒ Boolean
-
.sprockets? ⇒ Boolean
Environment detection helpers.
- .stylesheets_path ⇒ Object
Class Method Details
.assets_path ⇒ Object
33 34 35 |
# File 'lib/tabler/rubygem.rb', line 33 def assets_path @assets_path ||= File.join gem_path, 'assets' end |
.gem_path ⇒ Object
Paths
21 22 23 |
# File 'lib/tabler/rubygem.rb', line 21 def gem_path @gem_path ||= File. '..', File.dirname(__FILE__) end |
.hanami? ⇒ Boolean
46 47 48 |
# File 'lib/tabler/rubygem.rb', line 46 def hanami? defined?(::Hanami) end |
.javascripts_path ⇒ Object
29 30 31 |
# File 'lib/tabler/rubygem.rb', line 29 def javascripts_path File.join assets_path, 'javascripts' end |
.load! ⇒ Object
Inspired by Kaminari
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/tabler/rubygem.rb', line 8 def load! if rails? register_rails_engine elsif hanami? register_hanami elsif sprockets? register_sprockets end configure_sass end |
.rails? ⇒ Boolean
42 43 44 |
# File 'lib/tabler/rubygem.rb', line 42 def rails? defined?(::Rails) end |
.sprockets? ⇒ Boolean
Environment detection helpers
38 39 40 |
# File 'lib/tabler/rubygem.rb', line 38 def sprockets? defined?(::Sprockets) end |
.stylesheets_path ⇒ Object
25 26 27 |
# File 'lib/tabler/rubygem.rb', line 25 def stylesheets_path File.join assets_path, 'stylesheets' end |