class StellarCoreBackup::Config
Public Class Methods
new(config)
click to toggle source
# File lib/stellar-core-backup/config.rb, line 10 def initialize(config) if (File.exists?(config)) then @config = YAML.load_file(config) else raise ReadError end end
Public Instance Methods
configured?()
click to toggle source
# File lib/stellar-core-backup/config.rb, line 19 def configured?() unless @config.nil? || @config.empty? return true else return false end end
get(item)
click to toggle source
# File lib/stellar-core-backup/config.rb, line 28 def get(item) if self.configured?() then @config[item] else raise ReadError end end