class C
#attr_reader :value
#attr_writer :value
attr_accessor :value
def initialize(v)
@value = v
end
def show()
p @value
end
end
c1 = C.new(10)
p c1.value
c1.value = 20
p c1.value
Y2xhc3MgQwogICNhdHRyX3JlYWRlciA6dmFsdWUKICAjYXR0cl93cml0ZXIgOnZhbHVlCiAgYXR0cl9hY2Nlc3NvciA6dmFsdWUKICBkZWYgaW5pdGlhbGl6ZSh2KQogICAgQHZhbHVlID0gdgogIGVuZAogIGRlZiBzaG93KCkKICAgIHAgQHZhbHVlCiAgZW5kCmVuZApjMSA9IEMubmV3KDEwKQpwIGMxLnZhbHVlCmMxLnZhbHVlID0gMjAKcCBjMS52YWx1ZQ==