Sha256: 72603d8bbba9dd7bf6f4533252e78323f2f7d6f1d0e0b665823579ab514f4561

Contents?: true

Size: 549 Bytes

Versions: 15

Compression:

Stored size: 549 Bytes

Contents

module Sprite
  class Runner

    attr_accessor :options
    def initialize(args)
      self.options = set_options(args)
    end

    def set_options(args)
      opts = {}
      # TODO
      # edit options with passed in args
      opts[:path] = args.first if args.any?

      opts
    end

    # run sprite creator
    def run!
      begin
        Sprite::Builder.from_config(options[:path]).build
      # rescue Exception => e
      #   # catch errors
      #   puts "ERROR"
      #   puts e
      #   return 1
      end
      0
    end

  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
sprite-0.3.0 lib/sprite/runner.rb
sprite-0.2.7 lib/sprite/runner.rb
amikula-sprite-0.1.13 lib/sprite/runner.rb
sprite-0.2.6 lib/sprite/runner.rb
amikula-sprite-0.1.12 lib/sprite/runner.rb
sprite-0.2.5 lib/sprite/runner.rb
sprite-0.2.4 lib/sprite/runner.rb
sprite-0.2.2 lib/sprite/runner.rb
sprite-0.2.1 lib/sprite/runner.rb
sprite-0.2.0 lib/sprite/runner.rb
amikula-sprite-0.1.11 lib/sprite/runner.rb
amikula-sprite-0.1.10 lib/sprite/runner.rb
amikula-sprite-0.1.9 lib/sprite/runner.rb
amikula-sprite-0.1.8.1 lib/sprite/runner.rb
amikula-sprite-0.1.8 lib/sprite/runner.rb