328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
|
# File 'lib/excon/connection.rb', line 328
def inspect
vars = instance_variables.inject({}) do |accum, var|
accum.merge!(var.to_sym => instance_variable_get(var))
end
if vars[:'@data'][:headers].has_key?('Authorization')
vars[:'@data'] = vars[:'@data'].dup
vars[:'@data'][:headers] = vars[:'@data'][:headers].dup
vars[:'@data'][:headers]['Authorization'] = REDACTED
end
if vars[:'@data'][:password]
vars[:'@data'] = vars[:'@data'].dup
vars[:'@data'][:password] = REDACTED
end
inspection = '#<Excon::Connection:'
inspection += (object_id << 1).to_s(16)
vars.each do |key, value|
inspection += " #{key}=#{value.inspect}"
end
inspection += '>'
inspection
end
|