Class: IDL::Scanner::StrIStream

Inherits:
Object
  • Object
show all
Defined in:
lib/ridl/scanner.rb

Overview

of class In

Instance Method Summary collapse

Constructor Details

#initialize(src) ⇒ StrIStream

Returns a new instance of StrIStream.



165
166
167
168
# File 'lib/ridl/scanner.rb', line 165

def initialize(src)
  @src = src
  @ix = 0
end

Instance Method Details

#closeObject



177
178
179
# File 'lib/ridl/scanner.rb', line 177

def close
  @ix = 0
end

#getcObject



172
173
174
175
176
# File 'lib/ridl/scanner.rb', line 172

def getc
  ch = @src[@ix]
  @ix += 1
  ch
end

#to_sObject



169
170
171
# File 'lib/ridl/scanner.rb', line 169

def to_s
  @src
end