class CloudFlare::DynamicDNS::ConfigReader
Read cloudflare-dynamic-dns configuration that will be used for the cloudflare dns update.
Constants
- DEFAULT_CONFIG_PATH
Attributes
config[R]
path[R]
Public Class Methods
new(path: DEFAULT_CONFIG_PATH)
click to toggle source
@param [String] path to configuration, defaults to '/etc/cloudflare-dynamic-dns.conf'
# File lib/cloud_flare/dynamic_dns/config_reader.rb, line 10 def initialize(path: DEFAULT_CONFIG_PATH) @path = path || DEFAULT_CONFIG_PATH end
Public Instance Methods
read()
click to toggle source
@return [Array] config as an array object
# File lib/cloud_flare/dynamic_dns/config_reader.rb, line 15 def read @config = File.read(path) end