Class: Jira::Command::Tickets

Inherits:
Base
  • Object
show all
Defined in:
lib/jira/commands/tickets.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(jql) ⇒ Tickets

Returns a new instance of Tickets.



16
17
18
# File 'lib/jira/commands/tickets.rb', line 16

def initialize(jql)
  self.jql = jql
end

Instance Attribute Details

#jqlObject

Returns the value of attribute jql.



14
15
16
# File 'lib/jira/commands/tickets.rb', line 14

def jql
  @jql
end

Instance Method Details

#runObject



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/jira/commands/tickets.rb', line 20

def run
  return if jql.empty?
  return if .empty?
  return unless ['errorMessages'].nil?

  if rows.empty?
    puts "There are no tickets for jql=#{jql}."
    return
  end
  render_table(header, rows)
end