Class: NFAgent::MapperProxy

Inherits:
Object show all
Defined in:
lib/nfagent/mapper_proxy.rb

Class Method Summary collapse

Class Method Details

.find_account_id(username, client_ip) ⇒ Object

TODO: Can we delegate?



11
12
13
# File 'lib/nfagent/mapper_proxy.rb', line 11

def (username, client_ip)
  instance.(username, client_ip)
end

.instanceObject



4
5
6
7
8
# File 'lib/nfagent/mapper_proxy.rb', line 4

def instance
  return @instance if @instance
  raise "No Mapper Set" if Config.mapper.blank?
  @instance = Object.const_get(Config.mapper).new
end