mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
18 lines
208 B
Ruby
18 lines
208 B
Ruby
|
module CalcService
|
||
|
def self.add(lhs, rhs)
|
||
|
lhs + rhs
|
||
|
end
|
||
|
|
||
|
def self.sub(lhs, rhs)
|
||
|
lhs - rhs
|
||
|
end
|
||
|
|
||
|
def self.multi(lhs, rhs)
|
||
|
lhs * rhs
|
||
|
end
|
||
|
|
||
|
def self.div(lhs, rhs)
|
||
|
lhs / rhs
|
||
|
end
|
||
|
end
|