Class: Todo::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/gem_ext/todo-txt.rb

Overview

Monkeypatch todo-txt-gem to create ANSI decorated terminal output.

Instance Method Summary collapse

Instance Method Details

#to_s ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/gem_ext/todo-txt.rb', line 3

def to_s
  pastel = Pastel.new
  if done?
    pastel.strikethrough(super)
  else
    print_open_task(pastel)
  end
end