2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
|
# File 'lib/sc2ai/protocol/debug_pb.rb', line 2872
def as_json(options = {})
result = {}
tmp_text = @text.map { |v| v.as_json(options) }
result["text"] = tmp_text if !options[:compact] || tmp_text.any?
tmp_lines = @lines.map { |v| v.as_json(options) }
result["lines"] = tmp_lines if !options[:compact] || tmp_lines.any?
tmp_boxes = @boxes.map { |v| v.as_json(options) }
result["boxes"] = tmp_boxes if !options[:compact] || tmp_boxes.any?
tmp_spheres = @spheres.map { |v| v.as_json(options) }
result["spheres"] = tmp_spheres if !options[:compact] || tmp_spheres.any?
result
end
|