Class: EPP::Requests::Command
- Defined in:
- lib/epp-client/requests/command.rb
Instance Attribute Summary
Attributes inherited from Abstract
Instance Method Summary collapse
-
#initialize(tid, command, extension = nil) ⇒ Command
constructor
A new instance of Command.
- #name ⇒ Object
- #to_xml ⇒ Object
Methods inherited from Abstract
Methods included from XMLHelpers
#as_xml, #epp_namespace, #epp_node, #xml_document, #xml_namespace, #xml_node
Constructor Details
#initialize(tid, command, extension = nil) ⇒ Command
Returns a new instance of Command.
6 7 8 |
# File 'lib/epp-client/requests/command.rb', line 6 def initialize(tid, command, extension = nil) @tid, @command, @extension = tid, command, extension end |
Instance Method Details
#name ⇒ Object
10 11 12 |
# File 'lib/epp-client/requests/command.rb', line 10 def name 'command' end |
#to_xml ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/epp-client/requests/command.rb', line 14 def to_xml node = super @command.set_namespaces(@namespaces) if @command.respond_to?(:set_namespaces) @extension.set_namespaces(@namespaces) if @extension && @extension.respond_to?(:set_namespaces) node << as_xml(@command) node << as_xml(@extension) if @extension node << epp_node('clTRID', @tid, @namespaces) node end |