Class: IRB::ExtendCommand::Whereami
Instance Attribute Summary
Attributes inherited from Nop
Instance Method Summary collapse
Methods inherited from Nop
Constructor Details
This class inherits a constructor from IRB::ExtendCommand::Nop
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/irb/cmd/whereami.rb', line 9 def execute(*) code = irb_context.workspace.code_around_binding if code puts code else puts "The current context doesn't have code." end end |