Module: TaskLoop::TaskDataFile

Included in:
Task
Defined in:
lib/taskloop/task/task_data_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#data_proj_dirObject

~/.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_nameObject



18
19
20
# File 'lib/taskloop/task/task_data_file.rb', line 18

def logfile_name
  return sha1 + "_log"
end

#logfile_pathObject



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_nameObject



24
25
26
# File 'lib/taskloop/task/task_data_file.rb', line 24

def loopfile_name
  return sha1 + "_loop"
end

#loopfile_pathObject



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_nameObject



21
22
23
# File 'lib/taskloop/task/task_data_file.rb', line 21

def timefile_name
  return sha1 + "_time"
end

#timefile_pathObject



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