Class: VagrantPlugins::DNS::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



33
34
35
36
37
# File 'lib/vagrant-dns/config.rb', line 33

def initialize
  super

  @enabled = false
end

Instance Attribute Details

#enabledBoolean

Enable the use of this plugin

Returns:

  • (Boolean)


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

def enabled
  @enabled
end

#patternsArray

Configures DNS patterns

Usage example:

config.dns.patterns = [/^.*promojam.dev$/, /^.*coca-cola.dev$/]

Returns:

  • (Array)


16
17
18
# File 'lib/vagrant-dns/config.rb', line 16

def patterns
  @patterns
end

#tldsArray

Returns:

  • (Array)


31
32
33
# File 'lib/vagrant-dns/config.rb', line 31

def tlds
  @tlds
end

Instance Method Details

#tld=(tlds) ⇒ Object Also known as: tlds=

Configures tlds, taking an Array or a String as its argument.

Usage example:

config.dns.tlds = ["dev", "dom"]
config.dns.tld = "dev"


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

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