Method: Ptf::Commands::Task.show
- Defined in:
- lib/ptf/commands/task.rb
.show(id) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ptf/commands/task.rb', line 9 def show(id) if !Ptf::FileSystem.id_exist?(id.to_i) return "Task #{id} does not exist." end = Ptf::FileSystem.find_file id.to_i if .nil? return "Task #{id} has been closed. Reopen it with ptf task reopen ###." end info = Ptf::MetadataFile.create_from_file() data_file = File.join(Ptf::FileSystem.data_dir, info.hash) return File.read data_file end |