summaryrefslogtreecommitdiff
path: root/sample/export.rb
blob: be7b6bc797e756af2e93bad82be21922737a0134 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# method access permission
# output:
#	foobar
#	foo

class foo
  export(\printf)
end

def foobar
  print "foobar\n"
end

f = foo.new
#foo.unexport(\printf)
foo.export(\foobar)
f.foobar
f.printf "%s\n", foo