Class: Inspec::Resources::EtcHostsDeny

Inherits:
EtcHostsAllow show all
Defined in:
lib/inspec/resources/etc_hosts_allow_deny.rb

Instance Attribute Summary

Attributes inherited from EtcHostsAllow

#params

Instance Method Summary collapse

Methods included from FileReader

#read_file_content

Methods included from Utils::CommentParser

#parse_comment_line

Constructor Details

#initialize(path = nil) ⇒ EtcHostsDeny

Returns a new instance of EtcHostsDeny.



104
105
106
107
108
# File 'lib/inspec/resources/etc_hosts_allow_deny.rb', line 104

def initialize(path = nil)
  return skip_resource "`etc_hosts_deny` is not supported on your OS" unless inspec.os.linux?

  super(path || "/etc/hosts.deny")
end

Instance Method Details

#to_sObject



110
111
112
# File 'lib/inspec/resources/etc_hosts_allow_deny.rb', line 110

def to_s
  "hosts.deny Configuration"
end