Sha256: 031c25f4c14e13cc999d2785564f41e0995371e2fe9b3d0f291e68cbb2800821

Contents?: true

Size: 679 Bytes

Versions: 1

Compression:

Stored size: 679 Bytes

Contents

module Empezar
  class Runner
    def self.run argument = 'config/main.yaml'
      self.start_logger
      self.start_configuration argument
    end

    def self.start_configuration argument
      unless File.exist? argument
        raise ConfigurationFileMissingException, "The configuration file is missing from '#{argument}'"
      end
      Empezar::Configuration.instance.merge SymbolMatrix.new argument
    end

    def self.start_logger
      Dir.mkdir 'log' unless Dir.exist? 'log'
      Empezar::Log.start Logger.new 'log/main.log', 'daily'
    end
  end
end

class Runner
  class << self
    def method_missing *args
      Empezar::Runner.send *args
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
empezar-0.0.1 lib/empezar/runner.rb