Sha256: b41c4364de0dd8b4aeeddaea42ffaad7b3a421fc2ec32cd3eed2cb2105cb8699

Contents?: true

Size: 721 Bytes

Versions: 2

Compression:

Stored size: 721 Bytes

Contents

require "hot_tub"
require 'thread'
module HotTub
  # Super class for all HotTub clients
  # provides the 4 required methods to ensure compatibility
  class Client
    
    def client
      @client
    end
    
    def method_missing(method, *args, &blk)
      @client.send(method,*args,&blk)
    end
    
    def temporary?
      @temporary == true
    end
    
    def mark_temporary
      @temporary = true
    end
    
    # Override this method to perform the necessary action for ensure a client
    # is clean for use.
    def sanitize_hot_tub_client
      @client
    end
    
    def close_hot_tub_client
      @client
    end
    
    class << self
      def mutex
        Mutex.new
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hot_tub-0.0.2 lib/hot_tub/clients/client.rb
hot_tub-0.0.1 lib/hot_tub/clients/client.rb