Class: RailsKarmaSprockets::AssetsManager
- Inherits:
-
Object
- Object
- RailsKarmaSprockets::AssetsManager
- Includes:
- Singleton
- Defined in:
- lib/rails_karma_sprockets/assets_manager.rb
Constant Summary collapse
- COMPILED_ASSETS_DIR =
"#{Rails.root}/tmp/karma".freeze
- COMPILED_ASSET_PATH =
"#{COMPILED_ASSETS_DIR}/compiled_application.js".freeze
Instance Method Summary collapse
Instance Method Details
#compile! ⇒ Object
11 12 13 14 |
# File 'lib/rails_karma_sprockets/assets_manager.rb', line 11 def compile! @manifests ||= RailsKarmaSprockets.config.manifests compile_manifests end |
#destroy! ⇒ Object
16 17 18 |
# File 'lib/rails_karma_sprockets/assets_manager.rb', line 16 def destroy! FileUtils.rm_r(COMPILED_ASSETS_DIR) if Dir.exists?(COMPILED_ASSETS_DIR) end |
#exist? ⇒ Boolean
20 21 22 |
# File 'lib/rails_karma_sprockets/assets_manager.rb', line 20 def exist? File.exists? COMPILED_ASSET_PATH end |