class Opal::Nodes::LocalVariableNode

Public Instance Methods

compile() click to toggle source
# File lib/opal/nodes/variables.rb, line 16
def compile
  return push(var_name.to_s) unless using_irb?

  with_temp do |tmp|
    push property(var_name.to_s)
    wrap "((#{tmp} = Opal.irb_vars", ") == null ? nil : #{tmp})"
  end
end
using_irb?() click to toggle source
# File lib/opal/nodes/variables.rb, line 12
def using_irb?
  compiler.irb? && scope.top?
end