sudo (Capistrano::Configuration::Actions::Invocation)

    # File lib/capistrano/configuration/actions/invocation.rb, line 201
            def sudo(*parameters, &block)
              options = parameters.last.is_a?(Hash) ? parameters.pop.dup : {}
              command = parameters.first
              user = options[:as] && "-u #{options.delete(:as)}"

              sudo_prompt_option = "-p '#{sudo_prompt}'" unless sudo_prompt.empty?
              sudo_command = [fetch(:sudo, "sudo"), sudo_prompt_option, user].compact.join(" ")

              if command
                command = sudo_command + " " + command
                run(command, options, &block)
              else
                return sudo_command
              end
            end