Class: TaskWarrior::AnnotationMapper
- Inherits:
-
Object
- Object
- TaskWarrior::AnnotationMapper
- Defined in:
- lib/taskwarrior/annotation_mapper.rb
Overview
A DataMapper that makes new annotations from a JSON representation
Class Method Summary collapse
Class Method Details
.map(json) ⇒ Object
9 10 11 12 13 |
# File 'lib/taskwarrior/annotation_mapper.rb', line 9 def map(json) Annotation.new(json['description']).tap do |t| t.entry = DateTime.parse(json['entry']) end end |