Class: Inspec::Resources::PostgresIdentConf
- Inherits:
- 
      Object
      
        - Object
- Inspec::Resources::PostgresIdentConf
 
- Defined in:
- lib/resources/postgres_ident_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(ident_conf_path = nil)  ⇒ PostgresIdentConf 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of PostgresIdentConf. 
- #to_s ⇒ Object
Constructor Details
#initialize(ident_conf_path = nil) ⇒ PostgresIdentConf
Returns a new instance of PostgresIdentConf.
| 20 21 22 23 24 25 26 27 | # File 'lib/resources/postgres_ident_conf.rb', line 20 def initialize(ident_conf_path = nil) return skip_resource 'The `postgres_ident_conf` resource is not supported on your OS.' unless inspec.os.linux? @conf_file = ident_conf_path || File.('pg_ident.conf', inspec.postgres.conf_dir) @content = nil @params = nil read_content return skip_resource '`pg_ident_conf` is not yet supported on your OS' if inspec.os.windows? end | 
Instance Attribute Details
#conf_file ⇒ Object (readonly)
Returns the value of attribute conf_file.
| 18 19 20 | # File 'lib/resources/postgres_ident_conf.rb', line 18 def conf_file @conf_file end | 
#params ⇒ Object (readonly)
Returns the value of attribute params.
| 18 19 20 | # File 'lib/resources/postgres_ident_conf.rb', line 18 def params @params end | 
Instance Method Details
#to_s ⇒ Object
| 38 39 40 | # File 'lib/resources/postgres_ident_conf.rb', line 38 def to_s "PostgreSQL Ident Config #{@conf_file}" end |