Class: Inspec::Resources::PostgresHbaConf
- Inherits:
- 
      Object
      
        - Object
- Inspec::Resources::PostgresHbaConf
 
- Includes:
- FileReader
- Defined in:
- lib/inspec/resources/postgres_hba_conf.rb
Instance Attribute Summary collapse
- 
  
    
      #conf_file  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute conf_file. 
- 
  
    
      #params  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute params. 
Instance Method Summary collapse
- 
  
    
      #initialize(hba_conf_path = nil)  ⇒ PostgresHbaConf 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of PostgresHbaConf. 
- #to_s ⇒ Object
Methods included from FileReader
Constructor Details
#initialize(hba_conf_path = nil) ⇒ PostgresHbaConf
    TODO:
    
  
add checks to ensure that we have data in our file
Returns a new instance of PostgresHbaConf.
| 21 22 23 24 25 26 | # File 'lib/inspec/resources/postgres_hba_conf.rb', line 21 def initialize(hba_conf_path = nil) @conf_file = hba_conf_path || File.("pg_hba.conf", inspec.postgres.conf_dir) @content = "" @params = {} read_content end | 
Instance Attribute Details
#conf_file ⇒ Object (readonly)
Returns the value of attribute conf_file.
| 18 19 20 | # File 'lib/inspec/resources/postgres_hba_conf.rb', line 18 def conf_file @conf_file end | 
#params ⇒ Object (readonly)
Returns the value of attribute params.
| 18 19 20 | # File 'lib/inspec/resources/postgres_hba_conf.rb', line 18 def params @params end | 
Instance Method Details
#to_s ⇒ Object
| 38 39 40 | # File 'lib/inspec/resources/postgres_hba_conf.rb', line 38 def to_s "Postgres Hba Config #{@conf_file}" end |