Class: Inspec::Resources::EtcHostsAllow
- Inherits:
-
Object
- Object
- Inspec::Resources::EtcHostsAllow
- Includes:
- FileReader, Utils::CommentParser
- Defined in:
- lib/inspec/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.
- #to_s ⇒ Object
Methods included from FileReader
Methods included from Utils::CommentParser
Constructor Details
#initialize(hosts_allow_path = nil) ⇒ EtcHostsAllow
Returns a new instance of EtcHostsAllow.
22 23 24 25 26 27 |
# File 'lib/inspec/resources/etc_hosts_allow_deny.rb', line 22 def initialize(hosts_allow_path = nil) @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.
17 18 19 |
# File 'lib/inspec/resources/etc_hosts_allow_deny.rb', line 17 def params @params end |
Instance Method Details
#to_s ⇒ Object
36 37 38 |
# File 'lib/inspec/resources/etc_hosts_allow_deny.rb', line 36 def to_s "hosts.allow Configuration" end |