Class: Inspec::Resources::EtcHostsAllow

Inherits:
Object
  • Object
show all
Includes:
CommentParser, FileReader
Defined in:
lib/resources/etc_hosts_allow_deny.rb

Direct Known Subclasses

EtcHostsDeny

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from FileReader

#read_file_content

Methods included from CommentParser

#parse_comment_line

Constructor Details

#initialize(hosts_allow_path = nil) ⇒ EtcHostsAllow

Returns a new instance of EtcHostsAllow.



24
25
26
27
28
29
# File 'lib/resources/etc_hosts_allow_deny.rb', line 24

def initialize(hosts_allow_path = nil)
  @conf_path      = hosts_allow_path || '/etc/hosts.allow'
  @content        = nil
  @params         = nil
  read_content
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



19
20
21
# File 'lib/resources/etc_hosts_allow_deny.rb', line 19

def params
  @params
end