Class: Gotenberg::Helper::PropshaftAsset
- Inherits:
-
Object
- Object
- Gotenberg::Helper::PropshaftAsset
- Defined in:
- lib/gotenberg/helper.rb
Overview
Instance Attribute Summary collapse
-
#asset ⇒ Object
readonly
Returns the value of attribute asset.
Instance Method Summary collapse
- #content_type ⇒ Object
- #filename ⇒ Object
-
#initialize(asset) ⇒ PropshaftAsset
constructor
A new instance of PropshaftAsset.
- #to_s ⇒ Object
Constructor Details
#initialize(asset) ⇒ PropshaftAsset
Returns a new instance of PropshaftAsset.
13 14 15 |
# File 'lib/gotenberg/helper.rb', line 13 def initialize(asset) @asset = asset end |
Instance Attribute Details
#asset ⇒ Object (readonly)
Returns the value of attribute asset.
11 12 13 |
# File 'lib/gotenberg/helper.rb', line 11 def asset @asset end |
Instance Method Details
#content_type ⇒ Object
17 18 19 |
# File 'lib/gotenberg/helper.rb', line 17 def content_type asset.content_type.to_s end |
#filename ⇒ Object
25 26 27 |
# File 'lib/gotenberg/helper.rb', line 25 def filename asset.path.to_s end |
#to_s ⇒ Object
21 22 23 |
# File 'lib/gotenberg/helper.rb', line 21 def to_s asset.content end |