repo.or.cz
/
rbx.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Temporary tag for this failure. Updated CI spec coming.
[rbx.git]
/
kernel
/
core
/
method_table.rb
blob
1c1b336e8a26749d0d7ec44d8fcaa5db76e648e1
1
# depends on: class.rb
2
3
class MethodTable
4
def public_names
5
filter_names :public
6
end
7
8
def private_names
9
filter_names :private
10
end
11
12
def protected_names
13
filter_names :protected
14
end
15
16
alias_method :to_a, :public_names
17
18
def filter_names(filter)
19
map do |name, meth|
20
if meth.kind_of? RuntimePrimitive or
21
(meth.kind_of?(Tuple) and meth.first == filter) then
22
name
23
end
24
end.compact
25
end
26
end