Method: PgSync::Sync#config

Defined in:
lib/pgsync/sync.rb

#configObject



139
140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/pgsync/sync.rb', line 139

def config
  @config ||= begin
    if config_file
      begin
        YAML.load_file(config_file) || {}
      rescue Psych::SyntaxError => e
        raise Error, e.message
      end
    else
      {}
    end
  end
end