Class: WhoisXMLAPI::Contact
- Inherits:
-
Object
- Object
- WhoisXMLAPI::Contact
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/whoisxmlapi/contact.rb
Class Method Summary collapse
Class Method Details
.selectively_create_from_hash(h) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/whoisxmlapi/contact.rb', line 27 def self.selectively_create_from_hash(h) attr = { :name => h['name'], :organization => h['organization'], :street1 => h['street1'], :street2 => h['street2'], :city => h['city'], :state => h['state'], :postalCode => h['postalCode'], :country => h['country'], :countryCode => h['countryCode'], :email => h['email'], :telephone => h['telephone'], :fax => h['fax'], } Contact.create(attr) end |