Class: Sprockets::ProcessedAsset::DependencyFile
- Inherits:
-
Struct
- Object
- Struct
- Sprockets::ProcessedAsset::DependencyFile
- Defined in:
- lib/sprockets/processed_asset.rb
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(pathname, mtime, digest) ⇒ DependencyFile
constructor
A new instance of DependencyFile.
Constructor Details
#initialize(pathname, mtime, digest) ⇒ DependencyFile
Returns a new instance of DependencyFile.
77 78 79 80 81 |
# File 'lib/sprockets/processed_asset.rb', line 77 def initialize(pathname, mtime, digest) pathname = Pathname.new(pathname) unless pathname.is_a?(Pathname) mtime = Time.parse(mtime) if mtime.is_a?(String) super end |
Instance Method Details
#eql?(other) ⇒ Boolean
83 84 85 86 87 88 |
# File 'lib/sprockets/processed_asset.rb', line 83 def eql?(other) other.is_a?(DependencyFile) && pathname.eql?(other.pathname) && mtime.eql?(other.mtime) && digest.eql?(other.digest) end |
#hash ⇒ Object
90 91 92 |
# File 'lib/sprockets/processed_asset.rb', line 90 def hash pathname.to_s.hash end |