4 ms·
FooBar = Module.new def FooBar.foo(a) a < 0 ? bar(a, -1) : bar(a, 1) end def FooBar.bar(a, b) self.puts [a, b].reduce &:* end
by sergeykish 6y ago
FooBar = Module.new
def FooBar.foo(a) a < 0 ? bar(a, -1) : bar(a, 1) end
def FooBar.bar(a, b) self.puts [a, b].reduce &:* end