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.



324
325
326
# File 'lib/lazylead/system/jira.rb', line 324

def initialize(comment)
  @comment = comment
end

Instance Method Details

#authorObject



341
342
343
# File 'lib/lazylead/system/jira.rb', line 341

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

#include?(text) ⇒ Boolean

Check that comment has expected text

Returns:

  • (Boolean)


329
330
331
# File 'lib/lazylead/system/jira.rb', line 329

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

#linesObject



337
338
339
# File 'lib/lazylead/system/jira.rb', line 337

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

#to_sObject



333
334
335
# File 'lib/lazylead/system/jira.rb', line 333

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