Script: Switch is OFF

This is a very simple question, so I'll just get on with it.

What "script call" is required to check if $game_switches[141], for example, is OFF.

This should be a condition, also like:

if $game_switches[141] = off    then...

I know I could just use the condition branch and use the "else" for the switch, but I need this in ruby.

Thanks.
Moved to Learning Ruby/RGSS.
Two ==
What? I'm sorry I don't understand. 

You mean I have everything right except I needed two equal signs?

if $game_switches[141] == off 

Doesn't seem to be working for me.
You also need to check that it is false, not off
Okay, yes, thank you that's what was missing.

This topic can be closed; it is solved.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
You can also say


if !$game_switches[141]


The ! negates the value, so if the switch is off (false) !$game_switches[141] would return true. It's the same as saying $game_switches[141] == false

Original thread: https://forums.rpgmakerweb.com/threads/script-switch-is-off.17464/