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