Class: S3AssetsDeployer::AssetFile
- Inherits:
-
Object
- Object
- S3AssetsDeployer::AssetFile
- Defined in:
- lib/s3_assets_deployer/asset_file.rb
Instance Method Summary collapse
- #body ⇒ Object
- #content_type ⇒ Object
-
#initialize(path, realpath) ⇒ AssetFile
constructor
A new instance of AssetFile.
- #key ⇒ Object
Constructor Details
#initialize(path, realpath) ⇒ AssetFile
Returns a new instance of AssetFile.
5 6 7 8 |
# File 'lib/s3_assets_deployer/asset_file.rb', line 5 def initialize(path, realpath) @path = path @realpath = realpath end |
Instance Method Details
#body ⇒ Object
14 15 16 |
# File 'lib/s3_assets_deployer/asset_file.rb', line 14 def body File.new(@realpath) end |
#content_type ⇒ Object
18 19 20 |
# File 'lib/s3_assets_deployer/asset_file.rb', line 18 def content_type MIME::Types.type_for(@path).first.to_s end |
#key ⇒ Object
10 11 12 |
# File 'lib/s3_assets_deployer/asset_file.rb', line 10 def key @path end |