Class: EtcHosts

Inherits:
Object
  • Object
show all
Includes:
CommentParser
Defined in:
lib/resources/etc_hosts.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CommentParser

#parse_comment_line

Constructor Details

#initialize(hosts_path = nil) ⇒ EtcHosts

Returns a new instance of EtcHosts.



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

def initialize(hosts_path = nil)
  @conf_path      = hosts_path || default_hosts_file_path
  @content        = nil
  @params         = nil
  read_content
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



20
21
22
# File 'lib/resources/etc_hosts.rb', line 20

def params
  @params
end