Class: Sprockets::AssetWithDependencies::DependencyFile
- Inherits:
-
Struct
- Object
- Struct
- Sprockets::AssetWithDependencies::DependencyFile
- Defined in:
- lib/sprockets/asset_with_dependencies.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.
61 62 63 64 65 |
# File 'lib/sprockets/asset_with_dependencies.rb', line 61 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
67 68 69 70 71 72 |
# File 'lib/sprockets/asset_with_dependencies.rb', line 67 def eql?(other) other.is_a?(DependencyFile) && pathname.eql?(other.pathname) && mtime.eql?(other.mtime) && digest.eql?(other.digest) end |
#hash ⇒ Object
74 75 76 |
# File 'lib/sprockets/asset_with_dependencies.rb', line 74 def hash pathname.to_s.hash end |