Class: EPP::Contact::Command
- Inherits:
-
Object
- Object
- EPP::Contact::Command
show all
- Includes:
- XMLHelpers
- Defined in:
- lib/epp-client/contact/command.rb
Constant Summary
collapse
- DISCLOSE_ORDER =
['name', 'org', 'addr', 'voice', 'fax', 'email']
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from XMLHelpers
#as_xml, #epp_namespace, #epp_node, #xml_document, #xml_namespace, #xml_node
Instance Attribute Details
#namespaces ⇒ Object
Returns the value of attribute namespaces.
5
6
7
|
# File 'lib/epp-client/contact/command.rb', line 5
def namespaces
@namespaces
end
|
Instance Method Details
#name ⇒ Object
13
14
15
|
# File 'lib/epp-client/contact/command.rb', line 13
def name
raise NotImplementedError, "#name must be implemented in subclasses"
end
|
#set_namespaces(namespaces) ⇒ Object
9
10
11
|
# File 'lib/epp-client/contact/command.rb', line 9
def set_namespaces(namespaces)
@namespaces = namespaces
end
|
#to_xml ⇒ Object
17
18
19
20
21
22
23
24
25
|
# File 'lib/epp-client/contact/command.rb', line 17
def to_xml
@namespaces ||= {}
node = contact_node(name)
xattr = XML::Attr.new(node, "schemaLocation", SCHEMA_LOCATION)
xattr.namespaces.namespace = @namespaces['xsi'] || XML::Namespace.new(node, 'xsi', 'http://www.w3.org/2001/XMLSchema-instance')
node
end
|