Class: IDL::Scanner::StrIStream
- Inherits:
-
Object
- Object
- IDL::Scanner::StrIStream
- Defined in:
- lib/ridl/scanner.rb
Overview
of class In
Instance Method Summary collapse
- #close ⇒ Object
- #getc ⇒ Object
-
#initialize(src) ⇒ StrIStream
constructor
A new instance of StrIStream.
- #to_s ⇒ Object
Constructor Details
#initialize(src) ⇒ StrIStream
Returns a new instance of StrIStream.
150 151 152 153 |
# File 'lib/ridl/scanner.rb', line 150 def initialize(src) @src = src @ix = 0 end |
Instance Method Details
#close ⇒ Object
165 166 167 |
# File 'lib/ridl/scanner.rb', line 165 def close @ix = 0 end |
#getc ⇒ Object
159 160 161 162 163 |
# File 'lib/ridl/scanner.rb', line 159 def getc ch = @src[@ix] @ix += 1 ch end |
#to_s ⇒ Object
155 156 157 |
# File 'lib/ridl/scanner.rb', line 155 def to_s @src end |