123456789_123456789_123456789_123456789_123456789_

Class: IRB::ExtendCommand::Whereami

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Nop
Instance Chain:
self, Nop
Inherits: IRB::ExtendCommand::Nop
Defined in: lib/irb/cmd/whereami.rb

Class Method Summary

Nop - Inherited

.execute

See additional method definition at line 18.

.new

Instance Attribute Summary

Nop - Inherited

Instance Method Summary

Nop - Inherited

Constructor Details

This class inherits a constructor from IRB::ExtendCommand::Nop

Instance Method Details

#execute

[ GitHub ]

  
# 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