method
    
    scan_until
 
  scan_until(p1)
  public
  Scans the string until the pattern is matched. Returns the substring up to and including the end of the match, advancing the scan pointer to that location. If there is no match, nil is returned.
s = StringScanner.new("Fri Dec 12 1975 14:39") s.scan_until(/1/) # -> "Fri Dec 1" s.pre_match # -> "Fri Dec " s.scan_until(/XYZ/) # -> nil

 RSpec
RSpec Ruby on Rails
Ruby on Rails Ruby
Ruby 
   
   
    
 = protected
 = protected
  