Module: JupyterOnRails::IRubyKernelExtention

Included in:
IRuby::Kernel
Defined in:
lib/jupyter_on_rails/iruby_kernel_extention.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.rootObject

Returns the value of attribute root.



4
5
6
# File 'lib/jupyter_on_rails/iruby_kernel_extention.rb', line 4

def root
  @root
end

Instance Method Details

#runObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/jupyter_on_rails/iruby_kernel_extention.rb', line 7

def run
  original = Dir.pwd
  root = IRubyKernelExtention.root
  Dir.chdir root
  app_file = File.expand_path('config/application.rb', root)
  require app_file
  Rails.application.require_environment!
  Dir.chdir original
  super
end