Class: PHPSession::Decoder::State::VarName
- Inherits:
-
Object
- Object
- PHPSession::Decoder::State::VarName
- Defined in:
- lib/php_session/decoder.rb
Class Method Summary collapse
Class Method Details
.parse(decoder) ⇒ Object
120 121 122 123 124 125 126 127 128 |
# File 'lib/php_session/decoder.rb', line 120 def self.parse(decoder) matches = /^(.*?)\|(.*)$/.match(decoder.buffer) raise Errors::ParseError, "invalid format" if matches.nil? varName = matches[1] decoder.buffer = matches[2] decoder.stack.push(varName) decoder.state = VarType end |