Class: SPImaging::ShowImagesRequest
- Inherits:
-
Object
- Object
- SPImaging::ShowImagesRequest
- Defined in:
- lib/spimaging/show_images_request.rb
Instance Attribute Summary collapse
-
#uuids ⇒ Object
Returns the value of attribute uuids.
-
#xml ⇒ Object
Returns the value of attribute xml.
Instance Method Summary collapse
- #download ⇒ Object
-
#initialize(uuids) ⇒ ShowImagesRequest
constructor
A new instance of ShowImagesRequest.
Constructor Details
#initialize(uuids) ⇒ ShowImagesRequest
Returns a new instance of ShowImagesRequest.
7 8 9 |
# File 'lib/spimaging/show_images_request.rb', line 7 def initialize(uuids) self.uuids = uuids end |
Instance Attribute Details
#uuids ⇒ Object
Returns the value of attribute uuids.
5 6 7 |
# File 'lib/spimaging/show_images_request.rb', line 5 def uuids @uuids end |
#xml ⇒ Object
Returns the value of attribute xml.
5 6 7 |
# File 'lib/spimaging/show_images_request.rb', line 5 def xml @xml end |
Instance Method Details
#download ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# 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 |