Sha256: c1b412feb21003cad241a6d9327374776bf01886c70e892992506ae909e1c288
Contents?: true
Size: 523 Bytes
Versions: 10
Compression:
Stored size: 523 Bytes
Contents
# encoding: utf-8 require 'cgi' module RubyAMI class AsyncAGIEnvironmentParser def initialize(environment_string) @environment_string = environment_string.dup end def to_hash to_array.inject({}) do |accumulator, element| accumulator[element[0].to_sym] = element[1] || '' accumulator end end def to_s @environment_string.dup end private def to_array CGI.unescape(@environment_string).split("\n").map { |p| p.split ': ' } end end end
Version data entries
10 entries across 10 versions & 1 rubygems