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

Version Path
myreplicator-1.1.9 lib/configuration.rb~
myreplicator-1.1.7 lib/configuration.rb~
myreplicator-1.1.6 lib/configuration.rb~
myreplicator-1.1.3 lib/configuration.rb~
myreplicator-1.1.2 lib/configuration.rb~
myreplicator-1.1.0 lib/configuration.rb~
myreplicator-1.0.6 lib/configuration.rb~
myreplicator-1.0.5 lib/configuration.rb~
myreplicator-1.0.4 lib/configuration.rb~
myreplicator-1.0.3 lib/configuration.rb~
myreplicator-1.0.2 lib/configuration.rb~
myreplicator-1.0.1 lib/configuration.rb~
myreplicator-1.0.0 lib/configuration.rb~
myreplicator-0.1.1 lib/configuration.rb~
myreplicator-0.0.17 lib/configuration.rb~
myreplicator-0.0.16 lib/configuration.rb~
myreplicator-0.0.15 lib/configuration.rb~
myreplicator-0.0.14 lib/configuration.rb~
myreplicator-0.0.13 lib/configuration.rb~
myreplicator-0.0.12 lib/configuration.rb~