summaryrefslogtreecommitdiff
path: root/sample/attr.rb
blob: 83265295f34bf61cd5f981471f101c5eb154105b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# attribute access example
# output:
#	10
#	#<Foo: @test=10>

class Foo
  attr "test", %TRUE
end

foo = Foo.new
foo.test = 10
print foo.test, "\n"
foo._inspect.print
print "\n"