class StringScanner
Public Instance Methods
scan(strOrRegexp)
click to toggle source
# File bin/meta_compile, line 11 def scan(strOrRegexp) String === strOrRegexp ? scan_str(strOrRegexp) : old_scan(strOrRegexp) end
Also aliased as: old_scan, old_scan
scan_str(string)
click to toggle source
Add scan for string since base StringScanner
lack that…
# File bin/meta_compile, line 5 def scan_str(string) return nil unless self.peek(string.length) == string self.pos += string.length # Advance the position in the input string return string end