Module: Bootstrap::DateTimePicker

Defined in:
lib/bootstrap/datetimepicker.rb,
lib/bootstrap/datetimepicker/version.rb,
lib/bootstrap/datetimepicker/rails/engine.rb

Defined Under Namespace

Classes: Engine

Constant Summary collapse

VERSION =
"2.1.30"

Class Method Summary collapse

Class Method Details

.asset_pipeline?Boolean

Environment detection helpers

Returns:

  • (Boolean)


28
29
30
# File 'lib/bootstrap/datetimepicker.rb', line 28

def asset_pipeline?
  defined?(::Sprockets)
end

.assets_pathObject



15
16
17
# File 'lib/bootstrap/datetimepicker.rb', line 15

def assets_path
  @assets_path ||= File.join gem_path, 'vendor', 'assets'
end

.gem_pathObject

Paths



11
12
13
# File 'lib/bootstrap/datetimepicker.rb', line 11

def gem_path
  @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
end

.javascripts_pathObject



23
24
25
# File 'lib/bootstrap/datetimepicker.rb', line 23

def javascripts_path
  File.join assets_path, 'javascripts'
end

.load!Object



6
7
8
# File 'lib/bootstrap/datetimepicker.rb', line 6

def load!
  register_rails_engine if rails?
end

.rails?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/bootstrap/datetimepicker.rb', line 32

def rails?
  defined?(::Rails)
end

.stylesheets_pathObject



19
20
21
# File 'lib/bootstrap/datetimepicker.rb', line 19

def stylesheets_path
  File.join assets_path, 'stylesheets'
end