Object
# File lib/whois/record/parser/whois.ua.rb, line 60 def build_contact(element, type) contact_ids = content.scan(/#{element}:\s+(.+)\n/).flatten return if contact_ids.empty? contact_ids.map do |contact_id| textblock = content.slice(/contact-id:\s+#{contact_id}\n((?:.+\n)+)\n/, 1) address = textblock.scan(/address:\s+(.+)\n/).flatten address = address.reject { |a| a == "n/a" } Record::Contact.new( type: type, id: contact_id, name: textblock.slice(/person:\s+(.+)\n/, 1), organization: textblock.slice(/organization:\s+(.+)\n/, 1), address: address.join("\n"), zip: nil, state: nil, city: nil, country: textblock.slice(/country:\s+(.+)\n/, 1), phone: textblock.slice(/phone:\s+(.+)\n/, 1), fax: textblock.slice(/fax:\s+(.+)\n/, 1), email: textblock.slice(/e-mail:\s+(.+)\n/, 1), created_on: Time.parse(textblock.slice(/created:\s+(.+)\n/, 1)) ) end end
# File lib/whois/record/parser/whois.ua.rb, line 41 def created_on if content =~ /created:\s+(.+)\n/ Time.parse($1) end end
# File lib/whois/record/parser/whois.ua.rb, line 53 def expires_on if content =~ /expires:\s+(.+)\n/ Time.parse($1) end end
Generated with the Darkfish Rdoc Generator 2.