def open
      raise "Already open" if open?

      @http_session = Net::HTTP.new( "#{ api_key }.rest.akismet.com", 80 )

      begin
        @http_session.start
        block_given? ? yield : self
      ensure
        close if block_given?
      end
    end
def open
      raise "Already open" if open?

      @http_session = Net::HTTP.new( "#{ api_key }.rest.akismet.com", 80 )

      begin
        @http_session.start
        block_given? ? yield : self
      ensure
        close if block_given?
      end
    end
Opens the client, creating a new TCP connection.

 If a block is given, yields to the block, closes the client when the
 block returns, and returns the return value of the block. If a
 block is not given, returns self and leaves the client open, relying on
 the caller to close the client with {#close}.

 Note that opening and closing the client is only required if you want to
 make several calls over one TCP connection. Otherwise, you can simply
 call {#spam?}, {#check}, {#ham}, or {#spam}, which call {#open} for you
 if necessary.

 Due to a peculiarity of the Akismet API, {#verify_key} always creates its
 own connection.

 @overload open
   Opens the client, yields to the block, and closes the client when the
   block returns.
   @yield
     A block to be called when the client is open
   @return [Object]
     The return value of the block
   @raise [StandardError]
     The client is already open
 @overload open
   @return [self]
   @raise [StandardError]
     The client is already open