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