Fix a couple of examples in the README
This commit is contained in:
6
README
6
README
@@ -29,10 +29,6 @@ Usage example:
|
||||
api.command('eject', 'device' => 'ide1-cd0') {|m| puts "CDROM ejected" }
|
||||
api.query("status") {|m| puts "VM status now: #{m.inspect}" }
|
||||
|
||||
msg = my_own_magic_builder_method(arg1, arg2)
|
||||
api.send_message(msg) {|m| puts m.inspect }
|
||||
result = api.sync_send_message(msg) # Blocks until a response comes back
|
||||
|
||||
api.wait # Blocks until no commands or queries are outstanding.
|
||||
|
||||
api.command('quit') # Specifying a callback is optional
|
||||
@@ -49,7 +45,7 @@ You can also do this perfectly safely:
|
||||
end
|
||||
end
|
||||
|
||||
sleep(0.1) while api.nil?
|
||||
sleep(0.1) while api_outer.nil?
|
||||
# do stuff with the api object
|
||||
stopq.push(:ok)
|
||||
|
||||
|
Reference in New Issue
Block a user