Sha256: 8ca08551a7f22305869ffad0be35788ec5d4b60533aca0b5e6c571079bb72f99

Contents?: true

Size: 367 Bytes

Versions: 3

Compression:

Stored size: 367 Bytes

Contents

class Zencoder
  class Response < Zencoder

    def process_for_cli
      if success?
        self
      else
        if errors.any?
          puts "Errors:\n#{errors.map{|error| "* "+error }.join("\n")}"
        else
          puts "ERROR\n-----\n\n#{body}\n\nHTTP Response Code\n------------------\n#{code}"
        end
        exit(1)
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
zencoder-2.2.2 lib/zencoder/cli/response.rb
zencoder-2.2.1 lib/zencoder/cli/response.rb
zencoder-2.2.0 lib/zencoder/cli/response.rb