Class: EPP::Commands::Poll

Inherits:
Command
  • Object
show all
Defined in:
lib/epp-client/commands/poll.rb

Instance Method Summary collapse

Methods inherited from Command

#set_namespaces, #to_s

Methods included from XMLHelpers

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

Constructor Details

#initialize(msgID = nil) ⇒ Poll

Returns a new instance of Poll.



6
7
8
# File 'lib/epp-client/commands/poll.rb', line 6

def initialize(msgID = nil)
  @msgID = msgID
end

Instance Method Details

#nameObject



10
11
12
# File 'lib/epp-client/commands/poll.rb', line 10

def name
  'poll'
end

#to_xmlObject



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/epp-client/commands/poll.rb', line 14

def to_xml
  node = super

  if @msgID
    node['op'] = 'ack'
    node['msgID'] = @msgID
  else
    node['op'] = 'req'
  end

  node
end