Method: VORuby::VOTable::V1_0::Data#format
- Defined in:
- lib/voruby/votable/1.0/votable.rb
#format ⇒ Object
Retrieve the formatted data. May be TableData, Binary or Fits.
1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 |
# File 'lib/voruby/votable/1.0/votable.rb', line 1430 def format format_node = self.node.find_first("#{xpath_for(TableData)}|#{xpath_for(Binary)}|#{xpath_for(Fits)}") return nil if !format_node case format_node.name when 'TABLEDATA' then TableData.new(format_node) when 'BINARY' then Binary.new(format_node) when 'FITS' then Fits.new(format_node) else nil end end |