Class: TaskWarrior::Annotation

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations, Validations
Defined in:
lib/taskwarrior/annotation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Validations

#entry_cannot_be_in_the_future, #must_be_date_or_nil

Constructor Details

#initialize(description = nil) ⇒ Annotation

Returns a new instance of Annotation.



14
15
16
# File 'lib/taskwarrior/annotation.rb', line 14

def initialize(description = nil)
  @description = description
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/taskwarrior/annotation.rb', line 5

def description
  @description
end

#entryObject

Returns the value of attribute entry.



5
6
7
# File 'lib/taskwarrior/annotation.rb', line 5

def entry
  @entry
end

Instance Method Details

#to_sObject



18
19
20
# File 'lib/taskwarrior/annotation.rb', line 18

def to_s
  "Annotation (#{entry}): #{description}"
end