Class: Hbtrack::CompleteSF

Inherits:
Object
  • Object
show all
Defined in:
lib/hbtrack/stat_formatter.rb

Instance Method Summary collapse

Instance Method Details

#format(hash) ⇒ String

Format in terms of the total and the count of done and undone.

Parameters:

  • hash (Hash)

Options Hash (hash):

  • :done (String)

    total of done

  • :undone (String)

    total of undone

Returns:

  • (String)

    formatted result



25
26
27
28
# File 'lib/hbtrack/stat_formatter.rb', line 25

def format(hash)
  total = hash[:done] + hash[:undone]
  "All: #{total}, Done: #{hash[:done]}, Undone: #{hash[:undone]}"
end