In the upvotes= method shown below, you'll find an alternate syntax for the 'if' statement. How would I write code that adds 5 to @upvotes unless the story is about "business"?
def upvotes=(upvotes)
@upvotes = upvotes
@upvotes *= 5 if is_about?("art")
@upvotes *= 8 if is_about?("music")
@upvotes *= 2 if is_about?("entertainment")
I am trying to understand how I would write this. Everything I have tried isn't working.