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
# File 'lib/tinymce/rails/asset_manifest.rb', line 6

def self.load(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



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

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

#each(pattern) ⇒ Object



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

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

#to_sObject



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

def to_s
  dump
end