1
12 34
I'd like to write something like
PhotoEndings = %w[JPG,MRW,JPE]
MovieEndings = %w[AVI]
case ext # determined from the photo file name
when PhotoEndings
<do something whenever ext is the same as any of the photo endings. >
when MovieEndings
<do something else>
else
end
I don't have to use case, any conditional will do.
Thanks. I hope I have explained this. I have no idea what to search for.
I did try some, but I'm a newbie and don't understand the more advanced
syntax.
I tried
when PhotoEndings.any
and
when PhotoEndings.or
Wild guesses, but they don't work.
PhotoEndings = %w[JPG,MRW,JPE]
MovieEndings = %w[AVI]
case ext # determined from the photo file name
when PhotoEndings
<do something whenever ext is the same as any of the photo endings. >
when MovieEndings
<do something else>
else
end
I don't have to use case, any conditional will do.
Thanks. I hope I have explained this. I have no idea what to search for.
I did try some, but I'm a newbie and don't understand the more advanced
syntax.
I tried
when PhotoEndings.any
and
when PhotoEndings.or
Wild guesses, but they don't work.