Class: VORuby::VOTables::VOTable::Data::BinaryStream

Inherits:
Object
  • Object
show all
Defined in:
lib/voruby/votables/data.rb,
lib/voruby/votables/rexml_parser.rb,
lib/voruby/votables/libxml_parser.rb

Overview

A class representing a binary stream.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stream = nil) ⇒ BinaryStream

stream

The basic information associated with a binary stream (type: Stream).



62
63
64
65
# File 'lib/voruby/votables/data.rb', line 62

def initialize(stream=nil)
Misc::TypeCheck.new(stream, Stream).check()
@stream = stream
end

Instance Attribute Details

#streamObject (readonly)

Returns the value of attribute stream.



57
58
59
# File 'lib/voruby/votables/data.rb', line 57

def stream
  @stream
end

Class Method Details

.from_xml(node) ⇒ Object



338
339
340
341
342
# File 'lib/voruby/votables/rexml_parser.rb', line 338

def self.from_xml(node)
stream = Stream.from_xml(node.elements.each('STREAM').first)
	
return self.new(stream)
end

Instance Method Details

#to_sObject



67
68
69
# File 'lib/voruby/votables/data.rb', line 67

def to_s
"{stream=#{stream}}"
end