SciRuby / iruby

Official gem repository: Ruby kernel for Jupyter/IPython Notebook
https://github.com/SciRuby/iruby
MIT License
890 stars 27 forks source link

Add to_iruby_mimebundle support #304

Closed mrkn closed 3 years ago

mrkn commented 3 years ago

Introduce to_iruby_mimebundle method support like IPython's _repr_mimebundle.

The new display algorithm is below.

If the object to be displayed can respond to to_iruby_mimebundle, IRuby first tries to format the object by this method. Then, IRuby tries to format the object by the renderers registered in the registry into MIME-types that are not formatted by to_iruby_mimebundle. Moreover, IRuby tries to format the object by to_xxx method for the MIME-types that have not been formatted in the following list.

If none of MIME-type are formatted at this time, IRuby tries to format the object by to_iruby method.

Finally, IRuby generates the text/plain format by inspect method if text/plain format is not generated yet.

mrkn commented 3 years ago

CI fails due to network errors. I tried to re-run after some hours.

mrkn commented 3 years ago

CI fails due to network errors. I tried to re-run after some hours.

It was not due to network errors, but my fault by missing apt update before apt install.