lib/whois/record/parser/whois.nic.sn.rb in whois-2.2.0 vs lib/whois/record/parser/whois.nic.sn.rb in whois-2.3.0

- old
+ new

@@ -1,11 +1,11 @@ #-- # Ruby Whois # # An intelligent pure Ruby WHOIS client and parser. # -# Copyright (c) 2009-2011 Simone Carletti <weppos@weppos.net> +# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net> #++ require 'whois/record/parser/base' @@ -74,23 +74,23 @@ end property_supported :registrant_contacts do if content_for_scanner =~ /Owner's handle:\s+(.+)\n/ - contact($1, Whois::Record::Contact::TYPE_REGISTRANT) + build_contact($1, Whois::Record::Contact::TYPE_REGISTRANT) end end property_supported :admin_contacts do if content_for_scanner =~ /Administrative Contact's handle:\s+(.+)\n/ - contact($1, Whois::Record::Contact::TYPE_ADMIN) + build_contact($1, Whois::Record::Contact::TYPE_ADMIN) end end property_supported :technical_contacts do if content_for_scanner =~ /Technical Contact's handle:\s+(.+)\n/ - contact($1, Whois::Record::Contact::TYPE_TECHNICAL) + build_contact($1, Whois::Record::Contact::TYPE_TECHNICAL) end end property_supported :nameservers do @@ -98,14 +98,18 @@ Record::Nameserver.new(name) end end - private + private - def contact(string, type) - Whois::Record::Contact.new(:type => type, :id => string, :name => string) - end + def build_contact(string, type) + Whois::Record::Contact.new( + :type => type, + :id => string, + :name => string + ) + end end end end