Class: PMD::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/pmd/config.rb

Constant Summary collapse

@@base_dir =
"/tmp/pmd"
@@update_frequency =

number of seconds between updates

1

Class Method Summary collapse

Class Method Details

.base_dirObject



8
9
10
# File 'lib/pmd/config.rb', line 8

def self.base_dir
  return @@base_dir
end

.break_lengthObject



38
39
40
41
42
43
44
# File 'lib/pmd/config.rb', line 38

def self.break_length
  value = 3
  if ENV.key "POMODORO_BREAK_LENGTH"
    value = ENV["POMODORO_BREAK_LENGTH"].to_i
  end
  return value * 60
end

.counter_pathObject



24
25
26
# File 'lib/pmd/config.rb', line 24

def self.counter_path
  return File.join @@base_dir, "counter"
end

.pause_pathObject



16
17
18
# File 'lib/pmd/config.rb', line 16

def self.pause_path
  return File.join @@base_dir, "pause"
end

.pomodoro_lengthObject

return seconds needed for pomodoro



29
30
31
32
33
34
35
36
# File 'lib/pmd/config.rb', line 29

def self.pomodoro_length
  value = 25
  value = 1
  if ENV.key "POMODORO_LENGTH"
    value = ENV["POMODORO_LENGTH"].to_i
  end
  return value * 60
end

.restart_pathObject



20
21
22
# File 'lib/pmd/config.rb', line 20

def self.restart_path
  return File.join @@base_dir, "restart"
end

.stop_pathObject



12
13
14
# File 'lib/pmd/config.rb', line 12

def self.stop_path
  return File.join @@base_dir, "stop"
end