Top Level Namespace
Defined Under Namespace
Instance Method Summary collapse
Instance Method Details
#require(*args) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/dxopal/patches/require_dxopal.rb', line 24 def require(*args) if args == ['dxopal'] # Do nothing, because DXOpal is already loaded and you don't need to find it else dxopal_orig_require(*args) end end |
#require_remote(url) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/dxopal/patches/require_remote.rb', line 2 def require_remote(url) %x{ var r = new XMLHttpRequest(); r.overrideMimeType("text/plain"); // https://github.com/yhara/dxopal/issues/12 r.open("GET", url, false); r.send(''); } eval `r.responseText` end |