Sha256: 764b023682d8163448415d7cd138efe037cd42b690c0b15d4971606fe32f43b5

Contents?: true

Size: 508 Bytes

Versions: 1

Compression:

Stored size: 508 Bytes

Contents

module Rbdock

  class Command
    autoload :Options, "rbdock/command/options"
    
    def self.run argv
      new(argv).execute
    end

    def initialize argv
      @logger = Log4r::Logger.new("rbdock::command")
      @argv   = argv
    end

    def execute
      options = Options.parse!(@argv)
      if options[:app]
        options[:app_path] = Rbdock.clone_app_to_local(options[:app])
      end
      Rbdock::Generate.run(options)
    rescue => e
      abort "Error: #{e.message}"
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rbdock-0.1.2 lib/rbdock/command.rb