Class: Lazylead::Comment
- Inherits:
-
Object
- Object
- Lazylead::Comment
- Defined in:
- lib/lazylead/system/jira.rb
Overview
Comment in jira ticket
Instance Method Summary collapse
- #author ⇒ Object
-
#include?(text) ⇒ Boolean
Check that comment has expected text.
-
#initialize(comment) ⇒ Comment
constructor
A new instance of Comment.
- #lines ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(comment) ⇒ Comment
Returns a new instance of Comment.
299 300 301 |
# File 'lib/lazylead/system/jira.rb', line 299 def initialize(comment) @comment = comment end |
Instance Method Details
#author ⇒ Object
316 317 318 |
# File 'lib/lazylead/system/jira.rb', line 316 def @comment.attrs["author"]["displayName"] end |
#include?(text) ⇒ Boolean
Check that comment has expected text
304 305 306 |
# File 'lib/lazylead/system/jira.rb', line 304 def include?(text) to_s.include? text end |
#lines ⇒ Object
312 313 314 |
# File 'lib/lazylead/system/jira.rb', line 312 def lines to_s.split("\n").reject(&:blank?) end |
#to_s ⇒ Object
308 309 310 |
# File 'lib/lazylead/system/jira.rb', line 308 def to_s @comment.attrs["body"] end |