How do I stop my Mac from ringing when I get a phone call on my iPhone?
Easy Peasy.

System Preferences > Notifications > FaceTime > uncheck 'Play sound for notifications'

Alternatively, you could just turn on 'Do Not Disturb' from the Today/Notifications widget easily when you need it by clicking on the notifications button in the menu bar and scrolling up the 'Do Not Disturb' setting will scroll into view