Sha256: 079180c2459a31edbc918562e1efb544a2366f369cb59400efb61e7e8d5d2d2f
Contents?: true
Size: 836 Bytes
Versions: 4
Compression:
Stored size: 836 Bytes
Contents
module Fog module Image class HuaweiCloud class V2 class Real def download_image(image_id, _content_range = nil, params) # TODO: implement content range handling request_hash = { :expects => [200, 204], :method => 'GET', :raw_body => true, :path => "images/#{image_id}/file", } request_hash[:response_block] = params[:response_block] if params[:response_block] request(request_hash).body end end class Mock def download_image(_image_id, _content_range = nil) response = Excon::Response.new response.status = [200, 204][rand(2)] response.body = "" response end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems