Sha256: c33724dd8cfcc60fca3e905423624f26b999ad530e6b27aa1dcfde5d691e03e6

Contents?: true

Size: 523 Bytes

Versions: 1

Compression:

Stored size: 523 Bytes

Contents

require 'mkmf'
require 'os'

module ExceptionAlarm

  PLAY_COMMAND = 'mpg123'

  def self.mpg123_not_found
    m = "exception_alarm warning: #{PLAY_COMMAND} command not found! #{PLAY_COMMAND} is required to play the mp3 alarm file."
    ic = self.mpg123_install_command
    m += " Please install #{PLAY_COMMAND} with '#{ic}'" if ic
    return m
  end

  def self.mpg123_install_command
    return "brew install #{PLAY_COMMAND}" if OS.osx?
    return "apt-get install #{PLAY_COMMAND}" if OS.linux?
    return nil
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
exception_alarm-0.1.0 lib/exception_alarm/mpg123.rb