Class: Inspec::Resources::PostgresIdentConf

Inherits:
Object
  • Object
show all
Includes:
FileReader
Defined in:
lib/inspec/resources/postgres_ident_conf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from FileReader

#read_file_content

Constructor Details

#initialize(ident_conf_path = nil) ⇒ PostgresIdentConf

Returns a new instance of PostgresIdentConf.



20
21
22
23
24
25
# File 'lib/inspec/resources/postgres_ident_conf.rb', line 20

def initialize(ident_conf_path = nil)
  @conf_file = ident_conf_path || File.expand_path("pg_ident.conf", inspec.postgres.conf_dir)
  @content = nil
  @params = nil
  read_content
end

Instance Attribute Details

#conf_fileObject (readonly)

Returns the value of attribute conf_file.



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

def conf_file
  @conf_file
end

#paramsObject (readonly)

Returns the value of attribute params.



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

def params
  @params
end

Instance Method Details

#to_sObject



34
35
36
# File 'lib/inspec/resources/postgres_ident_conf.rb', line 34

def to_s
  "PostgreSQL Ident Config #{@conf_file}"
end