Class: Registrar::Provider::OpenSRS::ContactSet
- Inherits:
-
Object
- Object
- Registrar::Provider::OpenSRS::ContactSet
- Defined in:
- lib/registrar/provider/opensrs/contact_set.rb
Instance Attribute Summary collapse
-
#contacts ⇒ Object
readonly
Returns the value of attribute contacts.
Instance Method Summary collapse
-
#initialize(contacts) ⇒ ContactSet
constructor
A new instance of ContactSet.
- #to_xml(builder) ⇒ Object
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
#contacts ⇒ Object (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 |