Method: Fire::Session#task_sheet
- Defined in:
- lib/fire/session.rb
#task_sheet ⇒ String (private)
Produce a printable list of tasks that can run from the command line.
215 216 217 218 219 220 221 222 223 |
# File 'lib/fire/session.rb', line 215 def task_sheet max = tasks.map{|n,t| n.to_s.size}.max.to_i layout = "ou %-#{max}s # %s" text = [] tasks.each do |name, task| text << layout % [name, task.description] if task.description end text.join("\n") end |