Class: Pomodoro::Formats::Today::Formatter
- Inherits:
-
Object
- Object
- Pomodoro::Formats::Today::Formatter
- Defined in:
- lib/pomodoro/formats/today/formatter.rb
Class Method Summary collapse
Class Method Details
.format(task) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/pomodoro/formats/today/formatter.rb', line 14 def self.format(task) output = [STATUS_SYMBOLS[self.status]] if @start_time || @end_time output << "[#{self.class.format_interval(@start_time, @end_time)}]" else output << "[#{@duration}]" unless @duration == DEFAULT_DURATION end output << @body output << @tags.map { |tag| "##{tag}"}.join(' ') unless @tags.empty? output.join(' ') end |