Class: Registrar::Provider::OpenSRS::ContactSet

Inherits:
Object
  • Object
show all
Defined in:
lib/registrar/provider/opensrs/contact_set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(contacts) ⇒ ContactSet

Returns a new instance of ContactSet.



6
7
8
# File 'lib/registrar/provider/opensrs/contact_set.rb', line 6

def initialize(contacts)
  @contacts = contacts
end

Instance Attribute Details

#contactsObject (readonly)

Returns the value of attribute contacts.



5
6
7
# File 'lib/registrar/provider/opensrs/contact_set.rb', line 5

def contacts
  @contacts
end

Instance Method Details

#to_xml(builder) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/registrar/provider/opensrs/contact_set.rb', line 10

def to_xml(builder)
  builder.dt_assoc { |b|
    contacts.each do |key, contact|
      b.item(:key => key.to_s) { |b|
        b.dt_assoc { |b|
          contact.to_xml(b)
        }
      }
    end
  }
end