Skip to content

Commit

Permalink
Whois::Answer::Parser::Base#contacts refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
semaperepelitsa committed Feb 7, 2011
1 parent 972ca21 commit 333829a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/whois/answer/parser/base.rb
Expand Up @@ -278,10 +278,10 @@ def unchanged?(other)
#
def contacts
contacts = []
contacts.concat(registrant_contact.is_a?(Array) ? registrant_contact : [registrant_contact]) if property_supported?(:registrant_contact)
contacts.concat(admin_contact.is_a?(Array) ? admin_contact : [admin_contact]) if property_supported?(:admin_contact)
contacts.concat(technical_contact.is_a?(Array) ? technical_contact : [technical_contact]) if property_supported?(:technical_contact)
contacts.compact
[:registrant_contact, :admin_contact, :technical_contact].each do |property|
contacts << send(property) if property_supported?(property)
end
contacts.flatten.compact
end


Expand Down

0 comments on commit 333829a

Please sign in to comment.