def remote_ip
      return @env[Merb::Const::HTTP_CLIENT_IP] if @env.include?(Merb::Const::HTTP_CLIENT_IP)

      if @env.include?(Merb::Const::HTTP_X_FORWARDED_FOR) then
        remote_ips = @env[Merb::Const::HTTP_X_FORWARDED_FOR].split(',').reject do |ip|
          ip =~ Merb::Const::LOCAL_IP_REGEXP
        end

        return remote_ips.first.strip unless remote_ips.empty?
      end

      return @env[Merb::Const::REMOTE_ADDR]
    end
def remote_ip
      return @env[Merb::Const::HTTP_CLIENT_IP] if @env.include?(Merb::Const::HTTP_CLIENT_IP)

      if @env.include?(Merb::Const::HTTP_X_FORWARDED_FOR) then
        remote_ips = @env[Merb::Const::HTTP_X_FORWARDED_FOR].split(',').reject do |ip|
          ip =~ Merb::Const::LOCAL_IP_REGEXP
        end

        return remote_ips.first.strip unless remote_ips.empty?
      end

      return @env[Merb::Const::REMOTE_ADDR]
    end
==== Returns
 String:: The remote IP address.

 :api: public