module HttpEventLogger module Event class Headers def initialize(headers) @headers = headers || "" end def [](name) @headers.is_a?(Hash) ? @headers[name] : nil end def to_s @headers.is_a?(String) ? @headers : @headers.map { |key, value| "#{key}: #{value}" }.join(", ") end end end end