Method: TNetstring.parse_pair
- Defined in:
- lib/tnetstring.rb
permalink .parse_pair(data) ⇒ Object
:nodoc:
85 86 87 88 89 90 91 92 |
# File 'lib/tnetstring.rb', line 85 def self.parse_pair(data) # :nodoc: key, extra = parse(data) assert key.kind_of?(String) || key.kind_of?(Symbol), "Dictionary keys must be Strings or Symbols" assert extra, "Unbalanced dictionary store" value, extra = parse(extra) [key, value, extra] end |