Sha256: 78c81fc6f4397ed12c0d42a44f1f1696c3a8563011a9ff6c092b4e4fae791ef7

Contents?: true

Size: 405 Bytes

Versions: 1

Compression:

Stored size: 405 Bytes

Contents

# encoding: utf-8
module Filegen
  class Runner
    attr_reader :options, :generator

    def initialize(argv)
      @options = Options.new(argv)
      @generator = ErbGenerator.new(Env.new.my_binding)
    end

    def run
      begin
        generator.compile(options.source,options.destination)
      rescue Exception => e
        puts e.message
        exit 1
      end

      exit 0
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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