Class: MysqlBackup::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/mysql_backup/options.rb

Class Method Summary collapse

Class Method Details

.optionsObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/mysql_backup/options.rb', line 4

def options
  @@options ||= begin
    begin
      options = YAML::load(File.read('/etc/mysql_backup'))
    rescue Errno::ENOENT
      print <<-DOC

    You need to create the configuration file.

    To create the file, run the following commands from the command line:

    $ sudo mysql_backup_install

      DOC
      exit
    end
  end
end