Method: EtcHosts#initialize
- Defined in:
- lib/resources/etc_hosts.rb
#initialize(hosts_path = nil) ⇒ EtcHosts
Returns a new instance of EtcHosts.
29 30 31 32 33 |
# File 'lib/resources/etc_hosts.rb', line 29 def initialize(hosts_path = nil) content = read_file_content(hosts_path || default_hosts_file_path) @params = parse_conf(content.lines) end |