Class: Helm::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/helm/formatter.rb

Instance Method Summary collapse

Instance Method Details

#ticket_change(ticket, attribute, old_value, new_value) ⇒ Object



11
12
13
# File 'lib/helm/formatter.rb', line 11

def ticket_change(ticket, attribute, old_value, new_value)
  "#{ticket_number(ticket)} #{attribute} changed: #{old_value || '(none)'} => #{new_value}"
end

#ticket_number(ticket) ⇒ Object



3
4
5
# File 'lib/helm/formatter.rb', line 3

def ticket_number(ticket)
  "##{ticket.id}".rjust(4)
end

#ticket_with_title(ticket) ⇒ Object



7
8
9
# File 'lib/helm/formatter.rb', line 7

def ticket_with_title(ticket)
  "#{ticket_number(ticket)} #{ticket.title}"
end