These are chat archives for opal/opal

19th
Sep 2018
Jan Biedermann
@janbiedermann
Sep 19 2018 10:13

When do this:

class Tea < `SomeES6Class`

i can work with Tea in ruby.
What i want now is, to use it from JS, in such way, that it initialzes the ruby instance:

tea = new Opal.Tea

with tea now being the ruby instance. Can i do it, how?

Elia Schito
@elia
Sep 19 2018 10:16
tea.$new()
:)
Jan Biedermann
@janbiedermann
Sep 19 2018 10:17
ok, but how can i have tea.$new() run during new Opal.Tea?
i cant execute tea.$new(), because that is out of my control
Elia Schito
@elia
Sep 19 2018 10:18
you can't, $new is moro or less t = new SomeES6Class; t.$initialize(); return t
Jan Biedermann
@janbiedermann
Sep 19 2018 10:19
i see, thanks