# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby
require 'aspose_cells_cloud'

class Picture

  include AsposeCellsCloud
  def initialize
     #Get client_id and client_secret from https://cloud.aspose.com
    @instance =  AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl) 
  end

  # Delete a picture object in worksheet
  def delete_a_picture_object_in_worksheet
    name = $BOOK1
    sheet_name = $SHEET6
    picture_index = 0
    folder = $TEMPFOLDER
    result = @instance.upload_file( folder+"/"+name,  ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
    expect(result.uploaded.size).to  be > 0
    result = @instance.cells_pictures_delete_worksheet_picture(name, sheet_name, picture_index,  { :folder=>folder})
    expect(result.code).to eql(200)
  end

end

picture = Picture.new()
puts picture.delete_a_picture_object_in_worksheet