Sha256: 319ca3caddbe6e5dead4ee728b542537e2561125235c6cbba67b6f1d70512cfc

Contents?: true

Size: 422 Bytes

Versions: 3

Compression:

Stored size: 422 Bytes

Contents

module NFAgent
  class MapperProxy
    class << self
      def instance
        return @instance if @instance
        raise "No Mapper Set" if Config.mapper.blank?
        @instance = Object.const_get(Config.mapper).new
      end

      # TODO: Can we delegate?
      def find_account_id(username, client_ip)
        instance.find_account_id(username, client_ip)
      end

      # TODO: before shutdown
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nfagent-1.0.0 lib/nfagent/mapper_proxy.rb
nfagent-0.9.50 lib/nfagent/mapper_proxy.rb
nfagent-0.9.30 lib/nfagent/mapper_proxy.rb