Sha256: daefb7c9034a839d1ff0f949b1b844ea57c29a412cb08091182a47c15c4303b7
Contents?: true
Size: 535 Bytes
Versions: 14
Compression:
Stored size: 535 Bytes
Contents
module ConvertApi class Result attr_reader :response def initialize(response) @response = response end def conversion_cost response['ConversionCost'] end def file files.first end def files @files ||= response['Files'].map{ |file_info| ResultFile.new(file_info) } end def urls files.map(&:url) end def save_files(path) threads = files.map do |file| Thread.new { file.save(path) } end threads.map(&:value) end end end
Version data entries
14 entries across 14 versions & 1 rubygems