Module: ValueDomainDdns::Config

Defined in:
lib/value-domain-ddns/config.rb

Class Method Summary collapse

Class Method Details

.keysObject



4
5
6
# File 'lib/value-domain-ddns/config.rb', line 4

def self.keys
  [:domain, :password, :hostname, :ip]
end

.load(filepath) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/value-domain-ddns/config.rb', line 7

def self.load(filepath)
  hash = {}
  open(filepath) do |io|
    JSON.load(io).each do |key, value|
      hash[key.to_sym] = value
    end
  end
  hash
end