Module: Charty::IRubyHelper

Defined in:
lib/charty/iruby_helper.rb

Class Method Summary collapse

Class Method Details

.iruby_notebook?Boolean

Returns:

  • (Boolean)


5
6
7
8
# File 'lib/charty/iruby_helper.rb', line 5

def iruby_notebook?
  # TODO: This cannot distinguish notebook and console.
  defined?(IRuby)
end

.nteract?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/charty/iruby_helper.rb', line 14

def nteract?
  ENV.key?("NTERACT_EXE")
end

.vscode?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/charty/iruby_helper.rb', line 10

def vscode?
  ENV.key?("VSCODE_PID")
end