Class: AiTools::TimeKeeping
- Inherits:
-
Object
- Object
- AiTools::TimeKeeping
- Defined in:
- lib/ai_tools.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.sleep_mechanism ⇒ Object
55 56 57 |
# File 'lib/ai_tools.rb', line 55 def self.sleep_mechanism sleep(3) end |
Instance Method Details
#print_date ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/ai_tools.rb', line 59 def print_date require "espeak" time = Time.new hour_mod = time.hour%12 say_it = "Exact Date: #{time.month} #{time.day} #{time.year}" speech = ESpeak::Speech.new( say_it ) speech.speak s = sleep_mechanism end |
#print_time ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/ai_tools.rb', line 74 def print_time require "espeak" time = Time.new hour_mod = time.hour%12 normal_time = "Normal: #{hour_mod} #{time.min} #{time.sec}" military_time = "Military: #{time.hour} #{time.min} #{time.sec}" speech = ESpeak::Speech.new( normal_time ) speech.speak speech = ESpeak::Speech.new( military_time ) speech.speak s = sleep_mechanism end |