Module: BBNW::InvoiceDisplayUtils
Instance Method Summary
collapse
#is_number?, #long_date, #long_date_time, #long_time, #parse_time, #short_date, #short_time, #time_description
Instance Method Details
#company(details, start_date, end_date, hours) ⇒ Object
20
21
22
23
24
|
# File 'lib/utils/invoice_display_utils.rb', line 20
def company(details, start_date, end_date, hours)
details << "\n\n#{long_date(start_date)} - #{long_date(end_date)}" unless start_date.nil? || end_date.nil?
details << "\nBillable : #{hours} hours" unless hours.nil?
details.join("\n")
end
|
#display_price(price) ⇒ Object
11
12
13
14
|
# File 'lib/utils/invoice_display_utils.rb', line 11
def display_price(price)
display_price = "$#{price}"
"#{display_price}.00" unless price =~ /./
end
|
7
8
9
|
# File 'lib/utils/invoice_display_utils.rb', line 7
def (task_id)
task_id.is_a?(Integer) ? "Story #: #{task_id}" : task_id
end
|
#message_display(billed_commit) ⇒ Object
16
17
18
|
# File 'lib/utils/invoice_display_utils.rb', line 16
def message_display(billed_commit)
"( #{billed_commit.timestamp} )\t#{billed_commit.message}"
end
|