Class: VagrantDNS::Registry
- Inherits:
-
Object
- Object
- VagrantDNS::Registry
- Includes:
- Store
- Defined in:
- lib/vagrant-dns/registry.rb
Overview
This is the dns pattern registry (aka “config”) It basically delegates everything to a YAML::Store but handles the conversion of Regexp dns-patterns into YAML string keys and reverse.
Constant Summary collapse
- NAME =
"config"
Class Method Summary collapse
-
.open(tmp_path) ⇒ VagrantDNS::Registry?
Eitehr an instance or
nil
if cofig file does not exist.
Instance Method Summary collapse
-
#initialize(tmp_path) ⇒ Registry
constructor
A new instance of Registry.
Methods included from Store
Constructor Details
Class Method Details
.open(tmp_path) ⇒ VagrantDNS::Registry?
Returns Eitehr an instance or nil
if cofig file does not exist.
15 16 17 |
# File 'lib/vagrant-dns/registry.rb', line 15 def self.open(tmp_path) new(tmp_path) if File.exist?(File.join(tmp_path, NAME)) end |