Class: Irbtools::Command::Shadow

Inherits:
IRB::Command::Base
  • Object
show all
Defined in:
lib/irbtools/commands/shadow.rb

Instance Method Summary collapse

Instance Method Details

#execute(arg) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/irbtools/commands/shadow.rb', line 14

def execute(arg)
  if arg.strip.empty?
    p @irb_context.workspace.binding.shadow
  else
    p @irb_context.workspace.binding.eval(arg).shadow
  end
end