Class: VagrantDNS::Config

Inherits:
Vagrant::Config::Base
  • Object
show all
Defined in:
lib/vagrant-dns/config.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.auto_runObject

Returns the value of attribute auto_run.



6
7
8
# File 'lib/vagrant-dns/config.rb', line 6

def auto_run
  @auto_run
end

.ipv4onlyObject

Returns the value of attribute ipv4only.



6
7
8
# File 'lib/vagrant-dns/config.rb', line 6

def ipv4only
  @ipv4only
end

.listenObject

Returns the value of attribute listen.



6
7
8
# File 'lib/vagrant-dns/config.rb', line 6

def listen
  @listen
end

.loggerObject

Returns the value of attribute logger.



6
7
8
# File 'lib/vagrant-dns/config.rb', line 6

def logger
  @logger
end

Instance Attribute Details

#ipv4onlyObject

Returns the value of attribute ipv4only.



22
23
24
# File 'lib/vagrant-dns/config.rb', line 22

def ipv4only
  @ipv4only
end

#patternsObject

Returns the value of attribute patterns.



22
23
24
# File 'lib/vagrant-dns/config.rb', line 22

def patterns
  @patterns
end

#recordsObject

Returns the value of attribute records.



22
23
24
# File 'lib/vagrant-dns/config.rb', line 22

def records
  @records
end

#tldsObject

Returns the value of attribute tlds.



22
23
24
# File 'lib/vagrant-dns/config.rb', line 22

def tlds
  @tlds
end

Instance Method Details

#pattern=(pattern) ⇒ Object



24
25
26
# File 'lib/vagrant-dns/config.rb', line 24

def pattern=(pattern)
  self.patterns = pattern
end

#tld=(tld) ⇒ Object



28
29
30
# File 'lib/vagrant-dns/config.rb', line 28

def tld=(tld)
  @tlds = Array(tld)
end

#to_hashObject

explicit hash, to get symbols in hash keys



37
38
39
40
41
42
43
44
# File 'lib/vagrant-dns/config.rb', line 37

def to_hash
  {
    :patterns => (patterns ? Array(patterns) : patterns),
    :records => records,
    :tlds => tlds,
    :ipv4only => ipv4only
  }
end