Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Calculator
- def add(num)
- self + num
- end
- def subtract(num)
- self - num
- end
- def multiply_by(num)
- self * num
- end
- def divide_by(num)
- self / num.to_f
- end
- end
- class Numeric
- include Calculator
- end
Add Comment
Please, Sign In to add comment