Class: Gotenberg::Helper::PropshaftAsset

Inherits:
Object
  • Object
show all
Defined in:
lib/gotenberg/helper.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#assetObject (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_typeObject



17
18
19
# File 'lib/gotenberg/helper.rb', line 17

def content_type
  asset.content_type.to_s
end

#filenameObject



25
26
27
# File 'lib/gotenberg/helper.rb', line 25

def filename
  asset.path.to_s
end

#to_sObject



21
22
23
# File 'lib/gotenberg/helper.rb', line 21

def to_s
  asset.content
end