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.
165 166 167 168 |
# File 'lib/ridl/scanner.rb', line 165 def initialize(src) @src = src @ix = 0 end |
Instance Method Details
#close ⇒ Object
177 178 179 |
# File 'lib/ridl/scanner.rb', line 177 def close @ix = 0 end |
#getc ⇒ Object
172 173 174 175 176 |
# File 'lib/ridl/scanner.rb', line 172 def getc ch = @src[@ix] @ix += 1 ch end |
#to_s ⇒ Object
169 170 171 |
# File 'lib/ridl/scanner.rb', line 169 def to_s @src end |