Class: S2P::NotebookRunner

Inherits:
Redcarpet::Render::HTML
  • Object
show all
Defined in:
lib/s2p/notebook.rb

Constant Summary collapse

MAIN_BINDING =
binding

Instance Method Summary collapse

Instance Method Details

#block_code(text, operation) ⇒ Object



23
24
25
26
27
28
29
30
31
32
# File 'lib/s2p/notebook.rb', line 23

def block_code(text, operation)
  case operation
  when "ruby"
    eval(text, MAIN_BINDING) # See end of file for this hack.
  else
    raise NotImplementedError
  end

  ""
end