Class: Crm::Activity::Comment::Attachment
- Inherits:
-
Object
- Object
- Crm::Activity::Comment::Attachment
- Defined in:
- lib/crm/activity.rb
Overview
Attachment
represents an attachment of an activity comment.
Instance Attribute Summary collapse
-
#id ⇒ String
readonly
Returns the ID of this attachment.
Instance Method Summary collapse
-
#download_url ⇒ String
Generates a download URL for this attachment.
-
#initialize(id) ⇒ Attachment
constructor
A new instance of Attachment.
Constructor Details
#initialize(id) ⇒ Attachment
Returns a new instance of Attachment.
61 62 63 |
# File 'lib/crm/activity.rb', line 61 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ String (readonly)
Returns the ID of this attachment.
59 60 61 |
# File 'lib/crm/activity.rb', line 59 def id @id end |
Instance Method Details
#download_url ⇒ String
Generates a download URL for this attachment. Retrieve the attachment data by fetching this URL. This URL is only valid for a couple of minutes. Hence, it is recommended to have such URLs generated on demand.
71 72 73 |
# File 'lib/crm/activity.rb', line 71 def download_url Crm::Core::AttachmentStore.generate_download_url(id) end |