lib/irrc/parameter.rb in irrc-0.1.0 vs lib/irrc/parameter.rb in irrc-0.2.0
- old
+ new
@@ -1,33 +1,33 @@
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.
#
- # host - FQDN of IRR / Whois. IRR / Whois name is also accespted.
+ # 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(host, queue, &block)
- self.host = host
+ def initialize(fqdn, queue, cache, &block)
+ self.fqdn = fqdn
self.queue = queue
+ @cache = cache
instance_eval(&block) if block_given?
end
private
- def host=(host)
- raise ArgumentError, "Missing argument." unless host
- @host = Irrc::Irr.host(host) || host
+ 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