Class: CmlTimer::Confing
- Inherits:
-
Object
- Object
- CmlTimer::Confing
- Defined in:
- lib/cml_timer/config.rb
Instance Attribute Summary collapse
-
#notification_word ⇒ Object
Returns the value of attribute notification_word.
-
#pid_file_directory ⇒ Object
Returns the value of attribute pid_file_directory.
-
#system_voice ⇒ Object
Returns the value of attribute system_voice.
Instance Method Summary collapse
- #error_processing ⇒ Object
- #error_text(exception) ⇒ Object
-
#initialize ⇒ Confing
constructor
A new instance of Confing.
- #pid_file_prefix ⇒ Object
- #say_command ⇒ Object
Constructor Details
#initialize ⇒ Confing
Returns a new instance of Confing.
5 6 7 8 9 10 11 |
# File 'lib/cml_timer/config.rb', line 5 def initialize # pid file directory @pid_file_directory = '/tmp' @system_voice = 'Vicki' @notification_word = 'Good work!! Time up!' end |
Instance Attribute Details
#notification_word ⇒ Object
Returns the value of attribute notification_word.
3 4 5 |
# File 'lib/cml_timer/config.rb', line 3 def notification_word @notification_word end |
#pid_file_directory ⇒ Object
Returns the value of attribute pid_file_directory.
3 4 5 |
# File 'lib/cml_timer/config.rb', line 3 def pid_file_directory @pid_file_directory end |
#system_voice ⇒ Object
Returns the value of attribute system_voice.
3 4 5 |
# File 'lib/cml_timer/config.rb', line 3 def system_voice @system_voice end |
Instance Method Details
#error_processing ⇒ Object
21 22 23 |
# File 'lib/cml_timer/config.rb', line 21 def error_processing STDERR.puts error_text end |
#error_text(exception) ⇒ Object
17 18 19 |
# File 'lib/cml_timer/config.rb', line 17 def error_text(exception) "[ERROR]\t#{exception}" end |
#pid_file_prefix ⇒ Object
25 26 27 |
# File 'lib/cml_timer/config.rb', line 25 def pid_file_prefix 'cml_timer' end |
#say_command ⇒ Object
13 14 15 |
# File 'lib/cml_timer/config.rb', line 13 def say_command %x(say -v #{@system_voice} #{@notification_word}) end |