I have this block of code:
if %w[ups fedex usps].include?(carrier.slug)
send(carrier.slug).track(number)
end
Which effectively replicates:
ups.track(number)
fedex.track(number)
usps.track(number)
But what I now need is that, with instance variables:
@ups.track(number)
@fedex.track(number)
@usps.track(number)
What's the equivalent?