Sha256: e87ac0ff321531b7b61924a80e067840c3b1882557c0a818a99a2bbde9c5c508
Contents?: true
Size: 1017 Bytes
Versions: 3
Compression:
Stored size: 1017 Bytes
Contents
module Irrc module Parameter # 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') # } def initialize(fqdn, queue, cache, &block) self.fqdn = fqdn self.queue = queue @cache = cache instance_eval(&block) if block_given? end private def fqdn=(fqdn) raise ArgumentError, "Missing argument." unless fqdn @fqdn = fqdn end def queue=(queue) queue.is_a?(Queue) or raise ArgumentError, "Missing argument." @queue = queue end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
irrc-0.2.2 | lib/irrc/parameter.rb |
irrc-0.2.1 | lib/irrc/parameter.rb |
irrc-0.2.0 | lib/irrc/parameter.rb |