123456789_123456789_123456789_123456789_123456789_

Class: IRB::ExtendCommand::Help

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/help.rb

Class Method Summary

Nop - Inherited

Instance Attribute Summary

Nop - Inherited

Instance Method Summary

Constructor Details

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

Instance Method Details

#execute(*names)

[ GitHub ]

  
# File 'lib/irb/cmd/help.rb', line 18

def execute(*names)
  require 'rdoc/ri/driver'
  IRB::ExtendCommand::Help.const_set(:Ri, RDoc::RI::Driver.new)
rescue LoadError, SystemExit
  IRB::ExtendCommand::Help.remove_method(:execute)
  # raise NoMethodError in ensure
else
  def execute(*names)
    if names.empty?
      Ri.interactive
      return
    end
    names.each do |name|
      begin
        Ri.display_name(name.to_s)
      rescue RDoc::RI::Error
        puts $!.message
      end
    end
    nil
  end
  nil
ensure
  execute(*names)
end