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 "\n    You need to create the configuration file.\n\n    To create the file, run the following commands from the command line:\n\n    $ sudo mysql_backup_install\n\n      DOC\n      exit\n    end\n  end\nend\n"