summaryrefslogtreecommitdiff
path: root/sample/export.rb
blob: 4046a7ec49f6efbc09ead4b997a1bb1943106357 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# methods 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