Guest User

Untitled

a guest
Dec 11th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. module CalculatorModule
  2. class Numeric
  3. def add(num)
  4. self + num
  5. end
  6. end
  7. class Numeric
  8. def subtract(num)
  9. self - num
  10. end
  11. end
  12. class Numeric
  13. def multiply_by(num)
  14. self * num
  15. end
  16. end
  17. class Numeric
  18. def divide_by(num)
  19. self / Float(num)
  20. end
  21. end
  22.  
  23. class TestClass
  24. include CalculatorModule
  25. end
  26. end
Add Comment
Please, Sign In to add comment