Module: NetProspex::Api::HasDomains
- Included in:
- Organization
- Defined in:
- lib/netprospex/api/sub_objects.rb
Instance Method Summary collapse
Instance Method Details
#initialize(*args) ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/netprospex/api/sub_objects.rb', line 42 def initialize(*args) super(*args) if self.domains.is_a? Hash domain = self.domains.fetch(:domain, {})[:url] self.domains = domain ? [domain] : [] elsif self.domains.is_a? Array #TODO: I'm just guessing at this formatting self.domains.map! {|h| h[:domain][:url]} end end |