Class: Inspec::Resources::EtcHostsAllow
- Inherits:
-
Object
- Object
- Inspec::Resources::EtcHostsAllow
- Includes:
- CommentParser
- Defined in:
- lib/resources/etc_hosts_allow_deny.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(hosts_allow_path = nil) ⇒ EtcHostsAllow
constructor
A new instance of EtcHostsAllow.
Methods included from CommentParser
Constructor Details
#initialize(hosts_allow_path = nil) ⇒ EtcHostsAllow
Returns a new instance of EtcHostsAllow.
22 23 24 25 26 27 28 |
# File 'lib/resources/etc_hosts_allow_deny.rb', line 22 def initialize(hosts_allow_path = nil) return skip_resource 'The `etc_hosts_allow` resource is not supported on your OS.' unless inspec.os.linux? @conf_path = hosts_allow_path || '/etc/hosts.allow' @content = nil @params = nil read_content end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
18 19 20 |
# File 'lib/resources/etc_hosts_allow_deny.rb', line 18 def params @params end |