Sha256: c07a7fae06080013fa3bcc79fa2bbf8791fc79761e95d110b8a796b6faa22d72
Contents?: true
Size: 629 Bytes
Versions: 27
Compression:
Stored size: 629 Bytes
Contents
module Myreplicator ## # Configuration class for avoiding load the yml file everytime and cleaner config settings ## class Configuration class << self; attr_accessor :tmp_path, :mysqldump, :mysql end # yml = YAML.load(File.read("#{Myreplicator.app_root}/config/myreplicator.yml")) # Kernel.p yml["myreplicator"] # @@tmp_path = yml["myreplicator"]["tmp_path"] # @@mysql = yml["myreplicator"]["mysql"] # @@mysqldump = yml["myreplicator"]["mysqldump"] end def self.config(&block) @@config ||= Myreplicator::Configuration.new yield @@config if block return @@config end end
Version data entries
27 entries across 27 versions & 1 rubygems