Class: Zend::Command::Ticket
Instance Attribute Summary collapse
-
#ticket ⇒ Object
readonly
Returns the value of attribute ticket.
Instance Method Summary collapse
-
#initialize(ticket_id) ⇒ Ticket
constructor
A new instance of Ticket.
- #print ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(ticket_id) ⇒ Ticket
Returns a new instance of Ticket.
6 7 8 |
# File 'lib/zend/command/ticket.rb', line 6 def initialize(ticket_id) @ticket = api.tickets.find(id: ticket_id, include: :users) end |
Instance Attribute Details
#ticket ⇒ Object (readonly)
Returns the value of attribute ticket.
4 5 6 |
# File 'lib/zend/command/ticket.rb', line 4 def ticket @ticket end |
Instance Method Details
#print ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/zend/command/ticket.rb', line 10 def print rows = Array.new rows << [value: col_subject, colspan: 3] rows << :separator rows << [col_requester, col_created, col_updated] puts Terminal::Table.new( style: { width: terminal_width, padding_left: 3 }, rows: rows ) puts col_description end |