Method: NIFTI::Stream#initialize
- Defined in:
- lib/nifti/stream.rb
#initialize(binary, string_endian, options = {}) ⇒ Stream
Creates a Stream instance.
Parameters
-
binary– A binary string. -
string_endian– Boolean. The endianness of the instance string (true for big endian, false for small endian). -
options– A hash of parameters.
Options
-
:index– Fixnum. A position (offset) in the instance string where reading will start.
32 33 34 35 36 37 |
# File 'lib/nifti/stream.rb', line 32 def initialize(binary, string_endian, ={}) @string = binary || "" @index = [:index] || 0 @errors = Array.new self.endian = string_endian end |