We haven't covered this yet, but here's how to raise an error in ruby:

```ruby
raise ArgumentError, "library must be a Library object"
```

In Ruby, however, we typically don't do class checks like this. Ruby uses the concept of "duck typing": if it walks like a duck and quacks like a duck, we treat it like one. This means that we only care that an object responds to the proper methods, rather than what it's class happens to be. In this case, we'd want to check the following, instead:

```ruby
if library.respond_to?(:check_out)
```