class WebpackManifest::Rails::Configuration

Attributes

manifests[R]

Public Class Methods

new() click to toggle source
# File lib/webpack_manifest/rails/configuration.rb, line 8
def initialize
  # default values
  @cache = false
  @manifests = ManifestRepository.new
end

Public Instance Methods

add(key, path) click to toggle source

Register a manfiest. You can register multiple files by calling `#add`.

# File lib/webpack_manifest/rails/configuration.rb, line 29
def add(key, path)
  @manifests.add(key, path, cache: @cache)
end
cache() click to toggle source
# File lib/webpack_manifest/rails/configuration.rb, line 14
def cache
  @cache
end
cache=(v) click to toggle source
# File lib/webpack_manifest/rails/configuration.rb, line 18
def cache=(v)
  @manifests.all_manifests.each { |m| m.cache = v }
  @cache = v
end
manifest=(path) click to toggle source

Register a single manifest as a default.

# File lib/webpack_manifest/rails/configuration.rb, line 24
def manifest=(path)
  @manifests.default = @manifests.add '', path, cache: @cache
end