Module: GraphQL::Backtrace::InspectResult
- Defined in:
- lib/graphql/backtrace/inspect_result.rb
Class Method Summary collapse
Class Method Details
.inspect_result(obj) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/graphql/backtrace/inspect_result.rb', line 7 def inspect_result(obj) case obj when Hash "{" + obj.map do |key, val| "#{key}: #{inspect_truncated(val)}" end.join(", ") + "}" when Array "[" + obj.map { |v| inspect_truncated(v) }.join(", ") + "]" else inspect_truncated(obj) end end |