Module: Cukunity::Unity::ClientMethods
- Included in:
- Android::Unity::Client, IOS::Unity::Client
- Defined in:
- lib/cukunity/unity/client_methods.rb
Constant Summary collapse
- DEFAULT_HOSTNAME =
'127.0.0.1'
- DEFAULT_PORT =
9921
Constants included from RequestLineResponseClientMethods
RequestLineResponseClientMethods::DEFAULT_TIMEOUT
Instance Method Summary collapse
Methods included from RequestLineResponseClientMethods
Methods included from Cukunity::Utils
#check_timeout, #merge_options, #restrict_options, #to_options, #wait_connectivity
Methods included from CommandFacade
#components, #gameobject, #gameobjects, #hint, #hints, #level, #load_level, #scene, #screen
Instance Method Details
#command(name, opts = {}) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/cukunity/unity/client_methods.rb', line 15 def command(name, opts = {}) req = opts.merge({'command' => name}) res = request(req.to_json) do |line| JSON.parse(line) end raise Exception::UnityCommandError.new(res['error']) if res.nil? or res.has_key?('error') res end |
#request_connect ⇒ Object
10 |
# File 'lib/cukunity/unity/client_methods.rb', line 10 alias_method :request_connect, :connect |