Class: IRB::MethodDocument

Inherits:
DocumentTarget show all
Defined in:
lib/irb/completion.rb

Overview

Represents a method/class documentation target. May hold multiple names when the receiver is ambiguous (e.g. ‘{}.any?` could be Hash#any? or Proc#any?). The dialog popup uses only the first name; the full-screen display renders all.

Instance Attribute Summary collapse

Attributes inherited from DocumentTarget

#name

Instance Method Summary collapse

Constructor Details

#initialize(*names) ⇒ MethodDocument

Returns a new instance of MethodDocument.



28
29
30
31
# File 'lib/irb/completion.rb', line 28

def initialize(*names)
  super(names.first)
  @names = names
end

Instance Attribute Details

#namesObject (readonly)

:nodoc:



26
27
28
# File 'lib/irb/completion.rb', line 26

def names
  @names
end