Class: TNETS::StreamParser

Inherits:
Object show all
Includes:
Enumerable
Defined in:
lib/tnetstrings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Enumerable

#each_tnets, #stream_tnets, #to_tnets

Constructor Details

#initialize(io) ⇒ StreamParser

Returns a new instance of StreamParser.



16
17
18
# File 'lib/tnetstrings.rb', line 16

def initialize(io)
  @io = io
end

Instance Attribute Details

#ioObject (readonly)

Returns the value of attribute io.



15
16
17
# File 'lib/tnetstrings.rb', line 15

def io
  @io
end

Instance Method Details

#each(&blk) ⇒ Object



21
22
23
# File 'lib/tnetstrings.rb', line 21

def each(&blk)
  c_tnets_stream(io, &blk)
end