Method: TNetstring.dump_dictionary
- Defined in:
- lib/tnetstring.rb
.dump_dictionary(dict) ⇒ Object
:nodoc:
175 176 177 178 179 180 181 |
# File 'lib/tnetstring.rb', line 175 def self.dump_dictionary(dict) # :nodoc: contents = dict.map do |key, value| assert key.kind_of?(String) || key.kind_of?(Symbol), "Dictionary keys must be Strings or Symbols" "#{dump(key)}#{dump(value)}" end.join "#{contents.length}:#{contents}}" end |