<p>How can I check whether a variable is defined in Ruby?  Is there an <code>isset</code>-type method available?</p>

```
defined?(your_var)
```
will work. Depending on what you're doing you can also do something like
```
your_var.nil?
```