class Eyecare::Alert::Beep

Attributes

end[RW]
player[RW]
start[RW]

Public Class Methods

new(options = {}) click to toggle source
# File lib/eyecare/alert.rb, line 25
def initialize(options = {})
  @player = options[:player]
  @start = Eyecare::Audio.new(options[:start], options[:player])
  @end = Eyecare::Audio.new(options[:end], options[:player])
end

Public Instance Methods

play(name) click to toggle source
# File lib/eyecare/alert.rb, line 31
def play(name)
  self.send(name).play if [:start, :end].include?(name)
end