Class: Inspec::Resources::MongodbConf
- Inherits:
-
JsonConfig
- Object
- JsonConfig
- Inspec::Resources::MongodbConf
- Defined in:
- lib/inspec/resources/mongodb_conf.rb
Instance Attribute Summary
Attributes inherited from JsonConfig
Instance Method Summary collapse
-
#initialize(conf_path = nil) ⇒ MongodbConf
constructor
A new instance of MongodbConf.
-
#resource_id ⇒ Object
set resource_id to “” if system is not able to determine the @conf_path.
Methods inherited from JsonConfig
#method_missing, #to_s, #value
Methods included from FileReader
Methods included from ObjectTraverser
Constructor Details
#initialize(conf_path = nil) ⇒ MongodbConf
Returns a new instance of MongodbConf.
17 18 19 20 21 22 23 24 25 |
# File 'lib/inspec/resources/mongodb_conf.rb', line 17 def initialize(conf_path = nil) @conf_path = conf_path || inspec.mongodb.conf_path if @conf_path.nil? return skip_resource "MongoDB conf path is not set." end super(@conf_path) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Inspec::Resources::JsonConfig
Instance Method Details
#resource_id ⇒ Object
set resource_id to “” if system is not able to determine the @conf_path
28 29 30 |
# File 'lib/inspec/resources/mongodb_conf.rb', line 28 def resource_id @conf_path || "mongodb_conf" end |