Sha256: d4dccaae3ef164ea529034e23567029dd39431b0a0cc488040cde061ed1d7944

Contents?: true

Size: 479 Bytes

Versions: 2

Compression:

Stored size: 479 Bytes

Contents

module DataForge
  module CLI
    class Main

      def initialize(argv, stdin=STDIN, stdout=STDOUT, stderr=STDERR, kernel=Kernel)
        @argv, @stdin, @stdout, @stderr, @kernel = argv, stdin, stdout, stderr, kernel
      end



      def execute!
        options = CLI.parse_options @argv, @stdout
        load options.command_script if options.execute
      rescue Exception => e
        @stderr.puts "ERROR: " + e.message
        @kernel.exit 1
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
data_forge-0.1.1 lib/data_forge/cli/main.rb
data_forge-0.1 lib/data_forge/cli/main.rb