Class: RDoc::RI::NamedThing

Inherits:
Object
  • Object
show all
Defined in:
lib/rdoc/ri/descriptions.rb

Overview

– Descriptions are created by RDoc (in ri_generator) and written out in serialized form into the documentation tree. ri then reads these to generate the documentation ++

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ NamedThing

Returns a new instance of NamedThing.



13
14
15
# File 'lib/rdoc/ri/descriptions.rb', line 13

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



12
13
14
# File 'lib/rdoc/ri/descriptions.rb', line 12

def name
  @name
end

Instance Method Details

#<=>(other) ⇒ Object



17
18
19
# File 'lib/rdoc/ri/descriptions.rb', line 17

def <=>(other)
  @name <=> other.name
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/rdoc/ri/descriptions.rb', line 25

def eql?(other)
  @name.eql?(other)
end

#hashObject



21
22
23
# File 'lib/rdoc/ri/descriptions.rb', line 21

def hash
  @name.hash
end