Class: Lazylead::Comment

Inherits:
Object
  • Object
show all
Defined in:
lib/lazylead/system/jira.rb

Overview

Comment in jira ticket

Instance Method Summary collapse

Constructor Details

#initialize(comment) ⇒ Comment

Returns a new instance of Comment.



303
304
305
# File 'lib/lazylead/system/jira.rb', line 303

def initialize(comment)
  @comment = comment
end

Instance Method Details

#authorObject



320
321
322
# File 'lib/lazylead/system/jira.rb', line 320

def author
  @comment.attrs["author"]["displayName"]
end

#include?(text) ⇒ Boolean

Check that comment has expected text

Returns:

  • (Boolean)


308
309
310
# File 'lib/lazylead/system/jira.rb', line 308

def include?(text)
  to_s.include? text
end

#linesObject



316
317
318
# File 'lib/lazylead/system/jira.rb', line 316

def lines
  to_s.split("\n").reject(&:blank?)
end

#to_sObject



312
313
314
# File 'lib/lazylead/system/jira.rb', line 312

def to_s
  @comment.attrs["body"]
end