Question: I don't really know how to word this short enough for me to google it.

But is it possible to execute a certain condition in a multiple condition `while` loop *differently*, without creating a whole entire `while` loop.

For example, Is it possible to do something like this

```
while num == "" || num == "0"
   #ENTER CODE

```

Instead of doing this 

```
while num == ""
   print "YOU MUST ENTER A NUMBER!"
   num = gets.chomp
end

while num == "0"
   print "ZERO IS NOT A VALID NUMBER!"
   num = gets.chomp
end

```

I want to know is it possible to do this, but make it look more visually appealing and concise.

Answer: 
There is no straight-forwarded way. `Class` is a pointer to a class, not to a protocol. Even protocols are similar to classes inside the RTE, a `-isKindOfClass:` would not return `YES`, if the found class implements the protocol. 

You can do two things: 

1. Write a method `-decodeArrayOfItemsConformingToProtocol:forKey:`. Use the existing decode-methods as a template. I never have done this, but I think that it is more than an one-hour-job.
2. Use the RTE to find out, which classes conform to the protocol and take this as a list of the allowed classes.
If you are using Xcode 7 the advancements in objective-C make this possible using the new "light weight generics" feature:

```
[decoder decodeObjectOfClass:[NSArray<id<RecordEntity>> class] forKey:@"records"];

```

Note: This will compile totally fine, but I have not tested to make sure it read and write to disk perfectly. This would be a good place to start though.