Class: CommentElement
- Inherits:
-
Object
- Object
- CommentElement
- Defined in:
- lib/jirarest2/services/comment.rb
Overview
One single Comment TODO Maybe rewrite the initalize and then get a few other parameters like the issue-id or the comment-id
Instance Attribute Summary collapse
-
#author ⇒ String
readonly
The author of the comment.
-
#cdate ⇒ Time
readonly
creation date.
-
#mdate ⇒ Time
readonly
last modify date.
-
#text ⇒ String
readonly
text of the comment.
Instance Method Summary collapse
-
#initialize(author, text, cdate = Time.now, mdate = Time.now) ⇒ CommentElement
constructor
create one instance of an Comment.
Constructor Details
#initialize(author, text, cdate = Time.now, mdate = Time.now) ⇒ CommentElement
create one instance of an Comment
45 46 47 48 49 50 51 52 53 |
# File 'lib/jirarest2/services/comment.rb', line 45 def initialize(,text,cdate = Time.now,mdate = Time.now) @author = @text = text # parse time if needed cdate = Time.parse(cdate) if cdate.instance_of?(String) @cdate = cdate mdate = Time.parse(mdate) if mdate.instance_of?(String) @mdate = mdate end |
Instance Attribute Details
#author ⇒ String (readonly)
The author of the comment
29 30 31 |
# File 'lib/jirarest2/services/comment.rb', line 29 def @author end |
#cdate ⇒ Time (readonly)
creation date
35 36 37 |
# File 'lib/jirarest2/services/comment.rb', line 35 def cdate @cdate end |
#mdate ⇒ Time (readonly)
last modify date
38 39 40 |
# File 'lib/jirarest2/services/comment.rb', line 38 def mdate @mdate end |
#text ⇒ String (readonly)
text of the comment
32 33 34 |
# File 'lib/jirarest2/services/comment.rb', line 32 def text @text end |