class SPImaging::ShowImagesRequest

Attributes

uuids[RW]
xml[RW]

Public Class Methods

new(uuids) click to toggle source
# File lib/spimaging/show_images_request.rb, line 7
def initialize(uuids)
  self.uuids = uuids
end

Public Instance Methods

download() click to toggle source
# File lib/spimaging/show_images_request.rb, line 11
def download

  builder = Nokogiri::XML::Builder.new :encoding => 'utf-8' do |xml|
    # Clients that treat this as a real builder sometimes need to call 'tag!'
    # That's ok.
    def xml.tag!(*args, &bl)
      # Handle reserved names correctly
      name = args.shift + '_'
      send name, *args, &bl
    end

    xml.spimaging do
      xml.uuids do
        uuids.each do | uuid |
          xml.uuid(uuid)
        end
      end
    end
  end

  @xml = builder.to_xml
  SPImaging::Protocol.instance.download_images @xml
end