These are chat archives for opal/opal

Aug 2018
Ryan Prior
Aug 20 2018 22:16
I see that Opal has a module in its stdlib for base64:
However, in my code when I try to use ::Base64.encode64, it's giving me uninitialized constant Base64
Adding a require 'base64' doesn't help. Any ideas what I can do?
Ryan Prior
Aug 20 2018 22:50

Update: I decided to use this approach instead:

data_encoded = `btoa(#{data})`

However, I would still be happy to learn how to actually do this with Ruby code instead of calling out to JS if somebody can explain :)