lib/whois/parsers/base_icann_compliant.rb in whois-parser-1.2.0 vs lib/whois/parsers/base_icann_compliant.rb in whois-parser-2.0.0
- old
+ new
@@ -1,11 +1,11 @@
#--
# Ruby Whois
#
# An intelligent pure Ruby WHOIS client and parser.
#
-# Copyright (c) 2009-2018 Simone Carletti <weppos@weppos.net>
+# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
#++
require_relative 'base'
require 'whois/scanners/base_icann_compliant'
@@ -70,10 +70,11 @@
end
property_supported :registrar do
return unless node("Registrar")
+
Parser::Registrar.new({
id: node("Registrar IANA ID"),
name: node("Registrar"),
organization: node("Registrar"),
url: node("Registrar URL"),
@@ -134,10 +135,10 @@
private
def value_for_phone_property(element, property)
[
value_for_property(element, "#{property}"),
- value_for_property(element, "#{property} Ext")
+ value_for_property(element, "#{property} Ext"),
].reject(&:empty?).join(' ext: ')
end
def value_for_property(element, property)
Array.wrap(node("#{element} #{property}")).reject(&:empty?).join(', ')