Class: Convergence::Config::MySQL
- Inherits:
-
Object
- Object
- Convergence::Config::MySQL
- Defined in:
- lib/convergence/config.rb
Constant Summary collapse
- ATTRIBUTES =
%i[ssl_mode sslkey sslcert sslca sslcapath sslcipher sslverify].freeze
Instance Method Summary collapse
-
#initialize(attributes) ⇒ MySQL
constructor
A new instance of MySQL.
- #ssl_options ⇒ Object
Constructor Details
#initialize(attributes) ⇒ MySQL
Returns a new instance of MySQL.
14 15 16 17 18 19 20 |
# File 'lib/convergence/config.rb', line 14 def initialize(attributes) attributes.each do |k, v| next if v.nil? next if !ATTRIBUTES.include?(k.to_sym) && !ATTRIBUTES.include?(k.to_s) instance_variable_set("@#{k}", v) end end |
Instance Method Details
#ssl_options ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/convergence/config.rb', line 22 def { ssl_mode: ssl_mode, sslkey: sslkey, sslcert: sslcert, sslca: sslca, sslcapath: sslcapath, sslcipher: sslcipher, sslverify: sslverify }.compact end |