blob: 56566da8c9143f71f940a027682bb05b5600885c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
require 'rdoc/code_object'
##
# A constant
class RDoc::Constant < RDoc::CodeObject
##
# The constant's name
attr_accessor :name
##
# The constant's value
attr_accessor :value
##
# Creates a new constant with +name+, +value+ and +comment+
def initialize(name, value, comment)
super()
@name = name
@value = value
self.comment = comment
end
##
# Path to this constant
def path
"#{@parent.path}##{@name}"
end
end
|