Class: Hanami::Assets::Bundler::Asset Private

Inherits:
Object
  • Object
show all
Defined in:
lib/hanami/assets/bundler/asset.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.3.0

Constant Summary collapse

WILDCARD_EXT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 0.3.0

'.*'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, configuration) ⇒ Asset

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return a new instance

Since:

  • 0.3.0



29
30
31
32
# File 'lib/hanami/assets/bundler/asset.rb', line 29

def initialize(path, configuration)
  @path = path
  @configuration = configuration
end

Instance Attribute Details

#configurationObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.3.0



19
20
21
# File 'lib/hanami/assets/bundler/asset.rb', line 19

def configuration
  @configuration
end

#pathObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.3.0



15
16
17
# File 'lib/hanami/assets/bundler/asset.rb', line 15

def path
  @path
end

Instance Method Details

#base64_digest(algorithm) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.3.0



54
55
56
# File 'lib/hanami/assets/bundler/asset.rb', line 54

def base64_digest(algorithm)
  raw_digest(algorithm).base64digest
end

#expanded_fingerprinted_targetObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.3.0



48
49
50
# File 'lib/hanami/assets/bundler/asset.rb', line 48

def expanded_fingerprinted_target
  ::File.expand_path(fingerprinted_target)
end

#expanded_pathObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.3.0



36
37
38
# File 'lib/hanami/assets/bundler/asset.rb', line 36

def expanded_path
  ::File.expand_path(@path)
end

#fingerprinted_targetObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.3.0



42
43
44
# File 'lib/hanami/assets/bundler/asset.rb', line 42

def fingerprinted_target
  ::File.join(directory, "#{filename}-#{fingerprint}#{extension}")
end