Class: EPP::Host::Create

Inherits:
Command show all
Defined in:
lib/epp-client/host/create.rb

Instance Attribute Summary

Attributes inherited from Command

#namespaces

Instance Method Summary collapse

Methods inherited from Command

#set_namespaces

Methods included from XMLHelpers

#as_xml, #epp_namespace, #epp_node, #xml_document, #xml_namespace, #xml_node

Constructor Details

#initialize(name, addrs = {}) ⇒ Create

Returns a new instance of Create.



6
7
8
9
# File 'lib/epp-client/host/create.rb', line 6

def initialize(name, addrs = {})
  @name = name
  @addrs = addrs
end

Instance Method Details

#nameObject



11
12
13
# File 'lib/epp-client/host/create.rb', line 11

def name
  'create'
end

#to_xmlObject



15
16
17
18
19
20
21
# File 'lib/epp-client/host/create.rb', line 15

def to_xml
  node = super
  node << host_node('name', @name)
  addrs_to_xml(node, @addrs)

  node
end