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.
324 325 326 |
# File 'lib/lazylead/system/jira.rb', line 324 def initialize(comment) @comment = comment end |
Instance Method Details
#author ⇒ Object
341 342 343 |
# File 'lib/lazylead/system/jira.rb', line 341 def @comment.attrs["author"]["displayName"] end |
#include?(text) ⇒ Boolean
Check that comment has expected text
329 330 331 |
# File 'lib/lazylead/system/jira.rb', line 329 def include?(text) to_s.include? text end |
#lines ⇒ Object
337 338 339 |
# File 'lib/lazylead/system/jira.rb', line 337 def lines to_s.split("\n").reject(&:blank?) end |
#to_s ⇒ Object
333 334 335 |
# File 'lib/lazylead/system/jira.rb', line 333 def to_s @comment.attrs["body"] end |