Class: Inspec::Resources::MysqlConfEntry
- Inherits:
-
Object
- Object
- Inspec::Resources::MysqlConfEntry
- Defined in:
- lib/resources/mysql_conf.rb
Instance Method Summary collapse
-
#initialize(path, params) ⇒ MysqlConfEntry
constructor
A new instance of MysqlConfEntry.
- #method_missing(name, *_) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(path, params) ⇒ MysqlConfEntry
Returns a new instance of MysqlConfEntry.
13 14 15 16 |
# File 'lib/resources/mysql_conf.rb', line 13 def initialize(path, params) @params = params @path = path end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *_) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/resources/mysql_conf.rb', line 18 def method_missing(name, *_) k = name.to_s res = @params[k] return true if res.nil? && @params.key?(k) @params[k] end |
Instance Method Details
#to_s ⇒ Object
25 26 27 |
# File 'lib/resources/mysql_conf.rb', line 25 def to_s "MySQL Config entry [#{@path.join(' ')}]" end |