Method: Api::ResponseCreateGame#as_json

Defined in:
lib/sc2ai/protocol/sc2api_pb.rb

#as_json(options = {}) ⇒ Object



12148
12149
12150
12151
12152
12153
12154
12155
12156
# File 'lib/sc2ai/protocol/sc2api_pb.rb', line 12148

def as_json(options = {})
  result = {}

  result["error"] = @error if !options[:compact] || has_error?
  result["errorDetails"] = @error_details if !options[:compact] ||
    has_error_details?

  result
end