Class: VagrantPlugins::DNS::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::DNS::Config
- Defined in:
- lib/vagrant-dns/config.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Boolean
Enable the use of this plugin.
-
#patterns ⇒ Array
Configures DNS patterns.
- #tlds ⇒ Array
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
-
#tld=(tlds) ⇒ Object
(also: #tlds=)
Configures tlds, taking an Array or a String as its argument.
Constructor Details
#initialize ⇒ Config
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
#enabled ⇒ Boolean
Enable the use of this plugin
7 8 9 |
# File 'lib/vagrant-dns/config.rb', line 7 def enabled @enabled end |
#patterns ⇒ Array
Configures DNS patterns
Usage example:
config.dns.patterns = [/^.*promojam.dev$/, /^.*coca-cola.dev$/]
16 17 18 |
# File 'lib/vagrant-dns/config.rb', line 16 def patterns @patterns end |
#tlds ⇒ 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 |