Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

root/trunk/sample/basic/calc/calc2.rb

Revision 1843, 295 bytes (checked in by nahi, 2 years ago)
  • reorganize sampless
  • Property svn:eol-style set to native
  • Property svn:keywords set to author date id revision
Line 
1 class CalcService2
2   def initialize(value = 0)
3     @value = value
4   end
5
6   def set(value)
7     @value = value
8   end
9
10   def get
11     @value
12   end
13
14   def +(rhs)
15     @value + rhs
16   end
17
18   def -(rhs)
19     @value - rhs
20   end
21
22   def *(rhs)
23     @value * rhs
24   end
25
26   def /(rhs)
27     @value / rhs
28   end
29 end
Note: See TracBrowser for help on using the browser.