Class: TinyMCE::Rails::AssetManifest

Inherits:
Object
  • Object
show all
Defined in:
lib/tinymce/rails/asset_manifest.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



4
5
6
# File 'lib/tinymce/rails/asset_manifest.rb', line 4

def file
  @file
end

Class Method Details

.load(manifest_path) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/tinymce/rails/asset_manifest.rb', line 6

def self.load(manifest_path)
  NewPropshaftManifest.try(manifest_path) ||
    PropshaftManifest.try(manifest_path) ||
    JsonManifest.try(manifest_path, ".sprockets-manifest*.json") ||
    JsonManifest.try(manifest_path, "manifest*.json") ||
    JsonManifest.try(manifest_path) ||
    YamlManifest.try(manifest_path) ||
    NullManifest.new
end

Instance Method Details

#asset_path(logical_path) ⇒ Object



24
25
26
27
28
# File 'lib/tinymce/rails/asset_manifest.rb', line 24

def asset_path(logical_path)
  if digested = assets[logical_path]
    yield digested, logical_path if block_given?
  end
end

#each(pattern) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/tinymce/rails/asset_manifest.rb', line 16

def each(pattern)
  assets.each_key do |asset|
    if asset =~ pattern && !index_asset?(asset)
      yield asset
    end
  end
end

#to_sObject



30
31
32
# File 'lib/tinymce/rails/asset_manifest.rb', line 30

def to_s
  dump
end