Ruby - Methods - Variable Arguments

  • + 0 comments
    def full_name(first, *rest)
        rest.reduce(first) { |o, x| o + ' ' + x}
    end