Class: StringScanner

Inherits:
Object
  • Object
show all
Defined in:
lib/extensions/core.rb

Overview

This file contains extensions to the Ruby core

Instance Method Summary collapse

Instance Method Details

#orig_scan_untilObject



24
# File 'lib/extensions/core.rb', line 24

alias orig_scan_until scan_until

#pre_match_offset(offset) ⇒ Object



26
27
28
# File 'lib/extensions/core.rb', line 26

def pre_match_offset(offset)
  self.pre_match[offset..-1]
end

#scan_until(pattern) ⇒ Object

Like the original scan_until but sets the start of ‘pre_match’ to the current position not to zero



32
33
34
# File 'lib/extensions/core.rb', line 32

def scan_until(pattern)
  
end