Class: RI::NamedThing

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ NamedThing

Returns a new instance of NamedThing.



11
12
13
# File 'lib/rdoc/ri/ri_descriptions.rb', line 11

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name



10
11
12
# File 'lib/rdoc/ri/ri_descriptions.rb', line 10

def name
  @name
end

Instance Method Details

#<=>(other) ⇒ Object



14
15
16
# File 'lib/rdoc/ri/ri_descriptions.rb', line 14

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

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/rdoc/ri/ri_descriptions.rb', line 22

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

#hashObject



18
19
20
# File 'lib/rdoc/ri/ri_descriptions.rb', line 18

def hash
  @name.hash
end