Module: Irrc::Parameter

Included in:
Irrd::Client, Whoisd::Client
Defined in:
lib/irrc/parameter.rb

Instance Method Summary collapse

Instance Method Details

#initialize(fqdn, queue, cache, &block) ⇒ Object

Public: Create a new IRRd / Whoisd client worker.

You can customize the logger by specifying a block.
The default logger is STDERR printer of more severe messages than INFO.

fqdn - FQDN of IRR / Whois. queue - Queue object having query jobs.

IRR / Whois name is also accespted.

block - An optional block that can be used to customize the logger.

Examples

Irrc::Irrd::Client.new('jpirr.nic.ad.jp', queue) {|c|
  c.logger = Logger.new('irrc.log')
}


17
18
19
20
21
22
# File 'lib/irrc/parameter.rb', line 17

def initialize(fqdn, queue, cache, &block)
  self.fqdn = fqdn
  self.queue = queue
  @cache = cache
  instance_eval(&block) if block_given?
end