Class: Mys3ql::Config
- Inherits:
-
Object
- Object
- Mys3ql::Config
- Defined in:
- lib/mys3ql/config.rb
Instance Method Summary collapse
-
#access_key_id ⇒ Object
S3.
- #bin_log ⇒ Object
- #bin_path ⇒ Object
- #bucket ⇒ Object
- #database ⇒ Object
-
#debug=(val) ⇒ Object
General.
- #debugging? ⇒ Boolean
-
#initialize(config_file = nil) ⇒ Config
constructor
A new instance of Config.
- #password ⇒ Object
- #region ⇒ Object
- #secret_access_key ⇒ Object
-
#user ⇒ Object
MySQL.
Constructor Details
#initialize(config_file = nil) ⇒ Config
Returns a new instance of Config.
6 7 8 9 10 11 12 |
# File 'lib/mys3ql/config.rb', line 6 def initialize(config_file = nil) config_file = config_file || default_config_file @config = YAML.load_file File.(config_file) rescue Errno::ENOENT $stderr.puts "missing config file #{config_file}" exit 1 end |
Instance Method Details
#access_key_id ⇒ Object
S3
54 55 56 |
# File 'lib/mys3ql/config.rb', line 54 def access_key_id s3['access_key_id'] end |
#bin_log ⇒ Object
46 47 48 |
# File 'lib/mys3ql/config.rb', line 46 def bin_log mysql['bin_log'] end |
#bin_path ⇒ Object
42 43 44 |
# File 'lib/mys3ql/config.rb', line 42 def bin_path mysql['bin_path'] end |
#bucket ⇒ Object
62 63 64 |
# File 'lib/mys3ql/config.rb', line 62 def bucket s3['bucket'] end |
#database ⇒ Object
38 39 40 |
# File 'lib/mys3ql/config.rb', line 38 def database mysql['database'] end |
#debug=(val) ⇒ Object
General
18 19 20 |
# File 'lib/mys3ql/config.rb', line 18 def debug=(val) @debug = val end |
#debugging? ⇒ Boolean
22 23 24 |
# File 'lib/mys3ql/config.rb', line 22 def debugging? @debug end |
#password ⇒ Object
34 35 36 |
# File 'lib/mys3ql/config.rb', line 34 def password mysql['password'] end |
#region ⇒ Object
66 67 68 |
# File 'lib/mys3ql/config.rb', line 66 def region s3['region'] end |
#secret_access_key ⇒ Object
58 59 60 |
# File 'lib/mys3ql/config.rb', line 58 def secret_access_key s3['secret_access_key'] end |
#user ⇒ Object
MySQL
30 31 32 |
# File 'lib/mys3ql/config.rb', line 30 def user mysql['user'] end |