remise en page
This commit is contained in:
parent
0664f70f64
commit
8b12c2f51a
1 changed files with 15 additions and 8 deletions
23
task.rb
23
task.rb
|
@ -27,27 +27,34 @@ class Task
|
|||
end
|
||||
|
||||
def to_detailled_s
|
||||
res='desc: '+@description
|
||||
res='description: '+ @description
|
||||
if (@contexts.length>0):
|
||||
res<<="\n contexts:" + @contexts.map { |x| x.to_s }.join(" ")
|
||||
res<<="\n contexts:" +
|
||||
@contexts.map { |x| x.to_s }.join(" ")
|
||||
end
|
||||
if (@projects.length>0):
|
||||
res<<="\n projects:" + @projects.map { |x| '['+x.to_s+']' }.join(" ")
|
||||
res<<="\n projects:" +
|
||||
@projects.map { |x| '['+x.to_s+']' }.join(" ")
|
||||
end
|
||||
if (@priority != 0):
|
||||
res<<="\n priority: " + @priority.to_s
|
||||
res<<="\n priority: " +
|
||||
@priority.to_s
|
||||
end
|
||||
if (@notes.length>0):
|
||||
res<<="\n notes : " + @notes.map { |x| '('+x.to_s+')' }.join(" ")
|
||||
res<<="\n notes : " +
|
||||
@notes.map { |x| '('+x.to_s+')' }.join(" ")
|
||||
end
|
||||
if (@contacts.length>0):
|
||||
res<<="\n contacts:" + @contacts.map { |x| x.to_s }.join(" ")
|
||||
res<<="\n contacts:" +
|
||||
@contacts.map { |x| x.to_s }.join(" ")
|
||||
end
|
||||
if (@dates):
|
||||
res<<="\n dates :\n" + @dates.to_detailled_s
|
||||
res<<="\n dates :\n" +
|
||||
@dates.to_detailled_s
|
||||
end
|
||||
if (@tags.length>0):
|
||||
res<<="\n tags :" + '{' + @tags.map{ |x| x.to_s }.join(", ") + '}'
|
||||
res<<="\n tags :" +
|
||||
'{' + @tags.map{ |x| x.to_s }.join(", ") + '}'
|
||||
end
|
||||
return res
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue