Class: Rubyx::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyx/context.rb

Instance Method Summary collapse

Instance Method Details

#async_await(code, **globals) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/rubyx/context.rb', line 19

def async_await(code, **globals)
  if globals.empty?
    _async_await(code.to_s)
  else
    _async_await_with_globals(code.to_s, globals)
  end
end

#await(code, **globals) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/rubyx/context.rb', line 11

def await(code, **globals)
  if globals.empty?
    _await(code.to_s)
  else
    _await_with_globals(code.to_s, globals)
  end
end

#eval(code, **globals) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/rubyx/context.rb', line 3

def eval(code, **globals)
  if globals.empty?
    _eval(code.to_s)
  else
    _eval_with_globals(code.to_s, globals)
  end
end