Class: S3AssetDeploy::RemoteAsset
- Inherits:
-
Object
- Object
- S3AssetDeploy::RemoteAsset
- Defined in:
- lib/s3_asset_deploy/remote_asset.rb
Instance Attribute Summary collapse
-
#s3_object ⇒ Object
readonly
Returns the value of attribute s3_object.
Instance Method Summary collapse
- #==(other_asset) ⇒ Object
-
#initialize(s3_object, remove_fingerprint: nil) ⇒ RemoteAsset
constructor
A new instance of RemoteAsset.
- #last_modified ⇒ Object
- #original_path ⇒ Object
- #path ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(s3_object, remove_fingerprint: nil) ⇒ RemoteAsset
Returns a new instance of RemoteAsset.
8 9 10 11 |
# File 'lib/s3_asset_deploy/remote_asset.rb', line 8 def initialize(s3_object, remove_fingerprint: nil) @s3_object = s3_object @remove_fingerprint = remove_fingerprint end |
Instance Attribute Details
#s3_object ⇒ Object (readonly)
Returns the value of attribute s3_object.
6 7 8 |
# File 'lib/s3_asset_deploy/remote_asset.rb', line 6 def s3_object @s3_object end |
Instance Method Details
#==(other_asset) ⇒ Object
30 31 32 |
# File 'lib/s3_asset_deploy/remote_asset.rb', line 30 def ==(other_asset) path == other_asset.path end |
#last_modified ⇒ Object
22 23 24 |
# File 'lib/s3_asset_deploy/remote_asset.rb', line 22 def last_modified s3_object.last_modified end |
#original_path ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/s3_asset_deploy/remote_asset.rb', line 13 def original_path @original_path ||= if @remove_fingerprint @remove_fingerprint.call(path) else S3AssetDeploy::AssetHelper.remove_fingerprint(path) end end |
#path ⇒ Object
26 27 28 |
# File 'lib/s3_asset_deploy/remote_asset.rb', line 26 def path s3_object.key end |
#to_s ⇒ Object
34 35 36 |
# File 'lib/s3_asset_deploy/remote_asset.rb', line 34 def to_s path end |