Is it possible to change the htmlDialog title?

I can change a htmlDialog url:

dialog.set_url("https://example.com")

But how can I change the htmlDialog title (:dialog_title)?

Using keyword style argument or Options Hash (properties) as described here:
HtmlDialog #initialize-instance_method

You cannot change it once the object is created. You would have to recreate it with a different caption.