将Whois ruby​​gem与-h标志一起使用

时间:2019-04-11 19:13:06

标签: ruby-on-rails whois

是否可以使用带有<div class="carousel carousel-slider"> <a class="carousel-item" href="#one!"><img src="https://lorempixel.com/800/400/food/1"></a> <a class="carousel-item" href="#two!"><img src="https://lorempixel.com/800/400/food/2"></a> <a class="carousel-item" href="#three!"><img src="https://lorempixel.com/800/400/food/3"></a> <a class="carousel-item" href="#four!"><img src="https://lorempixel.com/800/400/food/4"></a> </div> document.addEventListener('DOMContentLoaded', function () { var elems = document.querySelectorAll('.carousel'), onCycleTo = function () { var activeIndicator = this.$indicators.find('.indicator-item.active'); i = activeIndicator.index(); document.getElementById("carouselIndex").innerHTML = i; }, instances = M.Carousel.init(elems, { indicators: true, onCycleTo: onCycleTo }); }); 标志的whois gem(https://github.com/weppos/whois)?我正在针对Rails项目中的特定数据库主机(例如-h)运行whois查询

如果没有,还有其他方法可以实现吗?

1 个答案:

答案 0 :(得分:0)

摘自https://www.rubydoc.info/gems/whois/Whois/Client上的文档

  

参数:

settings (Hash) (defaults to: {}) —

Hash of settings to customize the client behavior.
     

选项哈希(设置):

:timeout (Integer, nil) — default: DEFAULT_TIMEOUT —

The timeout for a WHOIS query, expressed in seconds.
:bind_host (String) — default: nil —

Providing an IP address or hostname will bind the Socket connection to the specific local host.
:bind_port (Fixnum) — default: nil —

Providing port number will bind the Socket connection to the specific local port.
:host (String, nil) — default: nil —

The server host to query. Leave it blank for intelligent detection.

所以

client = Whois::Client.new(:host => "whois.myserver.example")

应该是您所需要的。 不知道是否也需要更改端口。