Class: Inspec::Resources::OracledbConf

Inherits:
Object
  • Object
show all
Defined in:
lib/inspec/resources/oracledb_conf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ OracledbConf

Returns a new instance of OracledbConf.



18
19
20
21
# File 'lib/inspec/resources/oracledb_conf.rb', line 18

def initialize(opts = {})
  @oracledb_session = inspec.oracledb_session(opts)
  @opts = opts
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name) ⇒ Object



23
24
25
26
# File 'lib/inspec/resources/oracledb_conf.rb', line 23

def method_missing(name)
  setting = name.to_s.upcase
  determine_database_setting(setting)
end

Instance Attribute Details

#oracledb_sessionObject (readonly)

Returns the value of attribute oracledb_session.



16
17
18
# File 'lib/inspec/resources/oracledb_conf.rb', line 16

def oracledb_session
  @oracledb_session
end

Instance Method Details

#resource_idObject



32
33
34
# File 'lib/inspec/resources/oracledb_conf.rb', line 32

def resource_id
  @opts[:user] || ""
end

#to_sObject



28
29
30
# File 'lib/inspec/resources/oracledb_conf.rb', line 28

def to_s
  "Oracle DB Configuration"
end