module Rib::Beep

Public Instance Methods

loop_once() click to toggle source

————— Rib API —————

Calls superclass method
# File lib/rib/more/beep.rb, line 10
def loop_once
  return super if Beep.disabled?
  beep if started_at && (Time.now - started_at) > beep_threshold
  config[:started_at] = Time.now
  super
end

Private Instance Methods

beep() click to toggle source
# File lib/rib/more/beep.rb, line 18
def beep
  print "\a"
end
beep_threshold() click to toggle source
# File lib/rib/more/beep.rb, line 22
def beep_threshold
  config[:beep_threshold] ||= 5
end