summaryrefslogtreecommitdiff
path: root/test/rdoc/xref_data.rb
blob: 257b821f4f602d55178ed294d29315d3f57e60d2 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# frozen_string_literal: true
XREF_DATA = <<-XREF_DATA
class C1

  attr :attr

  # :section: separate

  attr_reader :attr_reader
  attr_writer :attr_writer

  # :section:
  attr_accessor :attr_accessor

  CONST = :const

  def self.m
  end

  def m foo
  end

  def +
  end
end

class C2
  def b
  end

  alias a b

  class C3
    def m
    end

    class H1
      def m?
      end
    end
  end
end

class C3
  class H1
  end

  class H2 < H1
  end
end

class C4
  class C4
  end
end

class C5
  class C1
  end
end

class C6
  private def priv1() end
  def pub1() end
  protected def prot1() end
  def pub2() end
  public def pub3() end
  def pub4() end

  private
  private def priv2() end
  def priv3() end
  protected def prot2() end
  def priv4() end
  public def pub5() end
  def priv5() end
  def self.s_pub1() end
  class << self
    def s_pub2() end
    private
    def s_priv1() end
  end

  protected
  private def priv6() end
  def prot3() end
  protected def prot4() end
  def prot5() end
  public def pub6() end
  def prot6() end
  def self.s_pub3() end
  class << self
    def s_pub4() end
    protected
    def s_prot1() end
  end
end

class C7
  attr_reader :attr_reader
  attr_reader :attr_reader_nodoc # :nodoc:
  attr_writer :attr_writer
  attr_writer :attr_writer_nodoc # :nodoc:
  attr_accessor :attr_accessor
  attr_accessor :attr_accessor_nodoc # :nodoc:

  CONST = :const
  CONST_NODOC = :const_nodoc # :nodoc:
end

class C8
  class << self
    class S1
    end
  end
end

class C9
  class A
    def foo() end
    def self.bar() end
  end

  class B < A
    def self.foo() end
    def bar() end
  end
end

class C10
  class C11
  end

  def C11
  end
end

def C10
end

class C11
end

def C11
end

module M1
  def m
  end
end

module M1::M2
end

class Parent
  def m() end
  def self.m() end
end

class Child < Parent
end

XREF_DATA