Class: PMD::Config
- Inherits:
-
Object
- Object
- PMD::Config
- 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
- .base_dir ⇒ Object
- .break_length ⇒ Object
- .counter_path ⇒ Object
- .pause_path ⇒ Object
-
.pomodoro_length ⇒ Object
return seconds needed for pomodoro.
- .restart_path ⇒ Object
- .stop_path ⇒ Object
Class Method Details
.base_dir ⇒ Object
8 9 10 |
# File 'lib/pmd/config.rb', line 8 def self.base_dir return @@base_dir end |
.break_length ⇒ Object
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_path ⇒ Object
24 25 26 |
# File 'lib/pmd/config.rb', line 24 def self.counter_path return File.join @@base_dir, "counter" end |
.pause_path ⇒ Object
16 17 18 |
# File 'lib/pmd/config.rb', line 16 def self.pause_path return File.join @@base_dir, "pause" end |
.pomodoro_length ⇒ Object
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_path ⇒ Object
20 21 22 |
# File 'lib/pmd/config.rb', line 20 def self.restart_path return File.join @@base_dir, "restart" end |
.stop_path ⇒ Object
12 13 14 |
# File 'lib/pmd/config.rb', line 12 def self.stop_path return File.join @@base_dir, "stop" end |