Class: Crm::Activity::Comment
- Inherits:
-
Object
- Object
- Crm::Activity::Comment
- Includes:
- Core::Mixins::AttributeProvider
- Defined in:
- lib/crm/activity.rb
Overview
Comment
represents a comment of an Activity, for example a single comment of a support case discussion.
Defined Under Namespace
Classes: Attachment
Instance Attribute Summary collapse
-
#attachments ⇒ Array<Attachment>
readonly
Returns the list of comment attachments.
-
#notes ⇒ String
readonly
Returns the comment text.
-
#published? ⇒ Boolean
readonly
Returns whether the comment is published.
-
#updated_at ⇒ Time
readonly
Returns the timestamp of the comment.
-
#updated_by ⇒ String
readonly
Returns the login of the API user who created the comment.
Instance Method Summary collapse
-
#initialize(raw_comment) ⇒ Comment
constructor
A new instance of Comment.
Methods included from Core::Mixins::AttributeProvider
#[], #attributes, #method_missing, #methods, #raw, #respond_to_missing?
Constructor Details
#initialize(raw_comment) ⇒ Comment
Returns a new instance of Comment.
76 77 78 79 80 81 82 |
# File 'lib/crm/activity.rb', line 76 def initialize(raw_comment) comment = raw_comment.dup comment['attachments'] = raw_comment['attachments'].map{ || Attachment.new() } super(comment) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Crm::Core::Mixins::AttributeProvider
Instance Attribute Details
#attachments ⇒ Array<Attachment> (readonly)
Returns the list of comment attachments.
|
# File 'lib/crm/activity.rb', line 84
|
#notes ⇒ String (readonly)
Returns the comment text.
|
# File 'lib/crm/activity.rb', line 99
|
#published? ⇒ Boolean (readonly)
Returns whether the comment is published.
108 109 110 |
# File 'lib/crm/activity.rb', line 108 def published? published end |
#updated_at ⇒ Time (readonly)
Returns the timestamp of the comment.
|
# File 'lib/crm/activity.rb', line 89
|
#updated_by ⇒ String (readonly)
Returns the login of the API user who created the comment.
|
# File 'lib/crm/activity.rb', line 94
|