I’d maybe consider using separate overloads:
def testy(var : String)
puts var
end
def testy(var : Array(String))
var.each do |entry|
puts entry
end
end
Be a bit cleaner without the conditional logic
I’d maybe consider using separate overloads:
def testy(var : String)
puts var
end
def testy(var : Array(String))
var.each do |entry|
puts entry
end
end
Be a bit cleaner without the conditional logic