Class: Alchemy::StorageAdapter::Dragonfly::AttachmentUrl
- Inherits:
-
Object
- Object
- Alchemy::StorageAdapter::Dragonfly::AttachmentUrl
- Defined in:
- app/models/alchemy/storage_adapter/dragonfly/attachment_url.rb
Overview
The class representing an URL to an Dragonfly attachment
Instance Attribute Summary collapse
-
#attachment ⇒ Object
readonly
Returns the value of attribute attachment.
Instance Method Summary collapse
-
#call(options = {}) ⇒ String
The attachment url.
-
#initialize(attachment) ⇒ AttachmentUrl
constructor
A new instance of AttachmentUrl.
Constructor Details
#initialize(attachment) ⇒ AttachmentUrl
Returns a new instance of AttachmentUrl.
10 11 12 |
# File 'app/models/alchemy/storage_adapter/dragonfly/attachment_url.rb', line 10 def initialize() @attachment = end |
Instance Attribute Details
#attachment ⇒ Object (readonly)
Returns the value of attribute attachment.
8 9 10 |
# File 'app/models/alchemy/storage_adapter/dragonfly/attachment_url.rb', line 8 def @attachment end |
Instance Method Details
#call(options = {}) ⇒ String
The attachment url
23 24 25 26 27 28 29 30 31 32 |
# File 'app/models/alchemy/storage_adapter/dragonfly/attachment_url.rb', line 23 def call( = {}) if .file [:format] ||= .suffix if .delete(:download) routes.(, ) else routes.(, ) end end end |