Class: Jira::Command::Log::List

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ticket = Jira::Core.ticket) ⇒ List

Returns a new instance of List.



17
18
19
# File 'lib/jira/commands/log/list.rb', line 17

def initialize(ticket=Jira::Core.ticket)
  self.ticket = ticket
end

Instance Attribute Details

#ticketObject

Returns the value of attribute ticket.



15
16
17
# File 'lib/jira/commands/log/list.rb', line 15

def ticket
  @ticket
end

Instance Method Details

#runObject



21
22
23
24
25
26
27
# File 'lib/jira/commands/log/list.rb', line 21

def run
  if logs.empty?
    puts "Ticket #{ticket} has no work logged."
    return
  end
  render_table(header, rows)
end