class AiTools::TimeKeeping
Public Class Methods
sleep_mechanism()
click to toggle source
# File lib/ai_tools.rb, line 55 def self.sleep_mechanism sleep(3) end
Public Instance Methods
print_date()
click to toggle source
# 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()
click to toggle source
# 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