Module: TaskLoop::TaskDataFile
- Included in:
- Task
- Defined in:
- lib/taskloop/task/task_data_file.rb
Instance Attribute Summary collapse
-
#data_proj_dir ⇒ Object
~/.taskloop/cache/<project-sha>.
Instance Method Summary collapse
- #logfile_name ⇒ Object
- #logfile_path ⇒ Object
- #loopfile_name ⇒ Object
- #loopfile_path ⇒ Object
- #timefile_name ⇒ Object
- #timefile_path ⇒ Object
- #write_to_logfile(content) ⇒ Object
- #write_to_loopfile(content) ⇒ Object
- #write_to_timefile(content) ⇒ Object
Instance Attribute Details
#data_proj_dir ⇒ Object
~/.taskloop/cache/<project-sha>.
4 5 6 |
# File 'lib/taskloop/task/task_data_file.rb', line 4 def data_proj_dir @data_proj_dir end |
Instance Method Details
#logfile_name ⇒ Object
18 19 20 |
# File 'lib/taskloop/task/task_data_file.rb', line 18 def logfile_name return sha1 + "_log" end |
#logfile_path ⇒ Object
6 7 8 |
# File 'lib/taskloop/task/task_data_file.rb', line 6 def logfile_path return File.join(@data_proj_dir, logfile_name) end |
#loopfile_name ⇒ Object
24 25 26 |
# File 'lib/taskloop/task/task_data_file.rb', line 24 def loopfile_name return sha1 + "_loop" end |
#loopfile_path ⇒ Object
14 15 16 |
# File 'lib/taskloop/task/task_data_file.rb', line 14 def loopfile_path return File.join(@data_proj_dir, loopfile_name) end |
#timefile_name ⇒ Object
21 22 23 |
# File 'lib/taskloop/task/task_data_file.rb', line 21 def timefile_name return sha1 + "_time" end |
#timefile_path ⇒ Object
10 11 12 |
# File 'lib/taskloop/task/task_data_file.rb', line 10 def timefile_path return File.join(@data_proj_dir, timefile_name) end |
#write_to_logfile(content) ⇒ Object
28 29 30 31 32 |
# File 'lib/taskloop/task/task_data_file.rb', line 28 def write_to_logfile(content) file = File.open(logfile_path, "w") file.puts content file.close end |
#write_to_loopfile(content) ⇒ Object
40 41 42 43 44 |
# File 'lib/taskloop/task/task_data_file.rb', line 40 def write_to_loopfile(content) file = File.open(loopfile_path, "w") file.puts content file.close end |
#write_to_timefile(content) ⇒ Object
34 35 36 37 38 |
# File 'lib/taskloop/task/task_data_file.rb', line 34 def write_to_timefile(content) file = File.open(timefile_path, "w") file.puts content file.close end |