Method: Arrow::Template::Parser#scan_for_quoted_string
- Defined in:
- lib/arrow/template/parser.rb
#scan_for_quoted_string(state, skip_whitespace = true) ⇒ Object
Given the specified state (an Arrow::Template::Parser::State object), scan for and return a quoted string, including the quotes. If skip_whitespace is true, any leading whitespace characters will be skipped. Returns nil if no quoted string is found.
437 438 439 440 441 442 443 444 445 446 447 |
# File 'lib/arrow/template/parser.rb', line 437 def scan_for_quoted_string( state, skip_whitespace=true ) #self.log.debug "Scanning for quoted string at %p" % # state.scanner.rest[0,20] state.scanner.skip( WHITESPACE ) if skip_whitespace rval = state.scanner.scan( QUOTEDSTRING ) or return nil #self.log.debug "Found quoted string %p" % rval return rval end |