Module: IRuby::Display
- Defined in:
- lib/iruby-plotly.rb
Class Method Summary collapse
Class Method Details
.protect(mime, data) ⇒ Object
5 6 7 8 |
# File 'lib/iruby-plotly.rb', line 5 def protect(mime, data) return data if mime == 'application/vnd.plotly.v1+json' MimeMagic.new(mime).text? ? data.to_s : [data.to_s].pack('m0') end |