Class: VtApi::ApiV2::Comments::Comment
- Inherits:
-
Object
- Object
- VtApi::ApiV2::Comments::Comment
- Defined in:
- lib/vt_api/api/v2/comments.rb
Overview
Representation of a comment
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#date_token ⇒ Object
readonly
Returns the value of attribute date_token.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(date_token, text) ⇒ Comment
constructor
Creates new Comment object from API data.
Constructor Details
#initialize(date_token, text) ⇒ Comment
Creates new Comment object from API data. It is not recommended to use this directly. Refer to API methods instead.
23 24 25 26 27 |
# File 'lib/vt_api/api/v2/comments.rb', line 23 def initialize(date_token, text) @date_token = date_token @date = DateTime.parse date_token @text = text end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
12 13 14 |
# File 'lib/vt_api/api/v2/comments.rb', line 12 def date @date end |
#date_token ⇒ Object (readonly)
Returns the value of attribute date_token.
12 13 14 |
# File 'lib/vt_api/api/v2/comments.rb', line 12 def date_token @date_token end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
12 13 14 |
# File 'lib/vt_api/api/v2/comments.rb', line 12 def text @text end |