remise en page

This commit is contained in:
Yann Esposito 2009-06-08 09:28:14 +02:00
parent 0664f70f64
commit 8b12c2f51a

23
task.rb
View file

@ -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