1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/soap/calc/calc2.rb

30 lines
307 B
Ruby
Raw Normal View History

class CalcService2
def initialize(value = 0)
@value = value
end
def set_value(value)
@value = value
end
def get_value
@value
end
def +(rhs)
@value + rhs
end
def -(rhs)
@value - rhs
end
def *(rhs)
@value * rhs
end
def /(rhs)
@value / rhs
end
end