Class: TaskWarrior::Dependencies::TaskPresenter
- Defined in:
- lib/twdeps/task_presenter.rb
Overview
Presents a task’s attributes suitable for a GraphViz node
Instance Attribute Summary
Attributes inherited from Presenter
Instance Method Summary collapse
-
#initialize(task) ⇒ TaskPresenter
constructor
A new instance of TaskPresenter.
Constructor Details
#initialize(task) ⇒ TaskPresenter
Returns a new instance of TaskPresenter.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/twdeps/task_presenter.rb', line 7 def initialize(task) self.id = task.uuid self.attributes = { :label => task.description, :tooltip => "Status: #{task.status}" } if :completed == task.status self.attributes.merge!({:fontcolor => 'gray', :color => 'gray'}) end end |