Module: Jquery::Datatables
- Defined in:
- lib/jquery-datatables.rb,
lib/jquery-datatables/engine.rb,
lib/jquery-datatables/version.rb,
lib/generators/jquery/datatables/install_generator.rb
Defined Under Namespace
Modules: Generators
Classes: Engine
Constant Summary
collapse
- VERSION =
"1.10.20"
Class Method Summary
collapse
Class Method Details
.assets_path ⇒ Object
34
35
36
|
# File 'lib/jquery-datatables.rb', line 34
def assets_path
@assets_path ||= File.join gem_path, 'app/assets'
end
|
.gem_path ⇒ Object
22
23
24
|
# File 'lib/jquery-datatables.rb', line 22
def gem_path
@gem_path ||= File.expand_path '..', File.dirname(__FILE__)
end
|
.hanami? ⇒ Boolean
47
48
49
|
# File 'lib/jquery-datatables.rb', line 47
def hanami?
defined?(::Hanami)
end
|
.javascripts_path ⇒ Object
30
31
32
|
# File 'lib/jquery-datatables.rb', line 30
def javascripts_path
File.join assets_path, 'javascripts'
end
|
.load! ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/jquery-datatables.rb', line 8
def load!
if rails?
register_rails_engine
elsif hanami?
register_hanami
elsif sprockets?
register_sprockets
elsif defined?(::Sass) && ::Sass.respond_to?(:load_paths)
::Sass.load_paths << stylesheets_path
end
end
|
.rails? ⇒ Boolean
43
44
45
|
# File 'lib/jquery-datatables.rb', line 43
def rails?
defined?(::Rails)
end
|
.sprockets? ⇒ Boolean
Environment detection helpers
39
40
41
|
# File 'lib/jquery-datatables.rb', line 39
def sprockets?
defined?(::Sprockets)
end
|
.stylesheets_path ⇒ Object
26
27
28
|
# File 'lib/jquery-datatables.rb', line 26
def stylesheets_path
File.join assets_path, 'stylesheets'
end
|