Class: BreezyPDF::Resources::Asset
- Inherits:
-
Object
- Object
- BreezyPDF::Resources::Asset
- Defined in:
- lib/breezy_pdf/resources/asset.rb
Overview
:nodoc
Instance Method Summary collapse
- #content_type ⇒ Object
- #file_path ⇒ Object
- #filename ⇒ Object
-
#initialize(base_url, asset_path_or_url) ⇒ Asset
constructor
A new instance of Asset.
Constructor Details
#initialize(base_url, asset_path_or_url) ⇒ Asset
Returns a new instance of Asset.
6 7 8 9 |
# File 'lib/breezy_pdf/resources/asset.rb', line 6 def initialize(base_url, asset_path_or_url) @base_url = base_url @asset_path_or_url = asset_path_or_url end |
Instance Method Details
#content_type ⇒ Object
11 12 13 |
# File 'lib/breezy_pdf/resources/asset.rb', line 11 def content_type io_object.content_type end |
#file_path ⇒ Object
19 20 21 |
# File 'lib/breezy_pdf/resources/asset.rb', line 19 def file_path file.path end |
#filename ⇒ Object
15 16 17 |
# File 'lib/breezy_pdf/resources/asset.rb', line 15 def filename @filename ||= URI(asset_url).path.split("/").last end |