Module: VORuby::Simple::VOTableMarshaller

Included in:
ConeSearch, ImageAccess, SpectralAccess
Defined in:
lib/voruby/simple/sap.rb

Overview

Mixin a method that converts an XML VOTable into an object using a VOTABLE::TreeParsedVOTable.

Instance Method Summary collapse

Instance Method Details

#marshallObject

Interpret the response into an object.



127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/voruby/simple/sap.rb', line 127

def marshall
  tmp_file = Tempfile.new('response_') # Open a temporary file.

  # Write the response.
  tmp_file.write(response())
  tmp_file.flush()

  # Create the votable
  votable = VORuby::VOTables::VOTable::TreeParsedVOTable.new(tmp_file.path(), parser())

  tmp_file.close()

  votable
end