Class: EtcHosts
- Inherits:
-
Object
- Object
- EtcHosts
- Includes:
- CommentParser
- Defined in:
- lib/resources/etc_hosts.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(hosts_path = nil) ⇒ EtcHosts
constructor
A new instance of EtcHosts.
Methods included from CommentParser
Constructor Details
#initialize(hosts_path = nil) ⇒ EtcHosts
Returns a new instance of EtcHosts.
22 23 24 25 26 27 28 |
# File 'lib/resources/etc_hosts.rb', line 22 def initialize(hosts_path = nil) return skip_resource 'The `etc_hosts` resource is not supported on your OS.' unless inspec.os.bsd? || inspec.os.linux? || inspec.os.windows? @conf_path = hosts_path || default_hosts_file_path @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.rb', line 18 def params @params end |