Class: RBS::CharScanner
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
StringScanner
|
|
Instance Chain:
self,
StringScanner
|
|
Inherits: |
StringScanner
|
Defined in: | lib/rbs/char_scanner.rb |
Class Method Summary
- .new(string) ⇒ CharScanner constructor
Instance Method Summary
Constructor Details
.new(string) ⇒ CharScanner
# File 'lib/rbs/char_scanner.rb', line 3
def initialize(string) super(string) @charpos = 0 end
Instance Method Details
#charpos
[ GitHub ]# File 'lib/rbs/char_scanner.rb', line 10
def charpos @charpos end
#original_charpos
[ GitHub ]# File 'lib/rbs/char_scanner.rb', line 8
alias original_charpos charpos
#scan(pattern)
[ GitHub ]# File 'lib/rbs/char_scanner.rb', line 14
def scan(pattern) s = super @charpos += s.size if s s end