lib/vagrant-hosts/config.rb in vagrant-hosts-2.1.5 vs lib/vagrant-hosts/config.rb in vagrant-hosts-2.2.0
- old
+ new
@@ -10,13 +10,16 @@
# @!attribute autoconfigure
# @return [TrueClass, FalseClass] If hosts should be generated from the
# other vagrant machines
attr_accessor :autoconfigure
+ attr_accessor :add_localhost_hostnames
+
def initialize
@hosts = []
@autoconfigure = UNSET_VALUE
+ @add_localhost_hostnames = UNSET_VALUE
end
# Register a host for entry
#
# @param [String] address The IP address for aliases
@@ -39,9 +42,13 @@
if @hosts.empty?
@autoconfigure = true
else
@autoconfigure = false
end
+ end
+
+ if @add_localhost_hostnames == UNSET_VALUE
+ @add_localhost_hostnames = true
end
end
# @param other [VagrantHosts::Config]
# @return [VagrantHosts::Config] The merged results