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.



326
327
328
# File 'lib/lazylead/system/jira.rb', line 326

def initialize(comment)
  @comment = comment
end

Instance Method Details

#authorObject



343
344
345
# File 'lib/lazylead/system/jira.rb', line 343

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

#include?(text) ⇒ Boolean

Check that comment has expected text

Returns:

  • (Boolean)


331
332
333
# File 'lib/lazylead/system/jira.rb', line 331

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

#linesObject



339
340
341
# File 'lib/lazylead/system/jira.rb', line 339

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

#to_sObject



335
336
337
# File 'lib/lazylead/system/jira.rb', line 335

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