Class: AssetFingerprinter::PathRewriter

Inherits:
Object
  • Object
show all
Defined in:
lib/asset_fingerprinter/path_rewriter.rb

Defined Under Namespace

Modules: Format

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ PathRewriter

Returns a new instance of PathRewriter.

Yields:

  • (_self)

Yield Parameters:



10
11
12
# File 'lib/asset_fingerprinter/path_rewriter.rb', line 10

def initialize
  yield self if block_given?
end

Instance Attribute Details

#fingerprinterObject

Returns the value of attribute fingerprinter.



8
9
10
# File 'lib/asset_fingerprinter/path_rewriter.rb', line 8

def fingerprinter
  @fingerprinter
end

#patternObject

Returns the value of attribute pattern.



8
9
10
# File 'lib/asset_fingerprinter/path_rewriter.rb', line 8

def pattern
  @pattern
end

Instance Method Details

#call(path) ⇒ Object



14
15
16
# File 'lib/asset_fingerprinter/path_rewriter.rb', line 14

def call(path)
  pattern.call(path, fingerprinter.call(path))
end