Class: EPP::Host::InfoResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/epp-client/host/info_response.rb

Instance Method Summary collapse

Methods inherited from Response

#initialize, #method, #method_missing, #respond_to?, #respond_to_missing?

Methods included from ResponseHelper

#nodes_for_xpath, #value_for_xpath, #values_for_xpath

Constructor Details

This class inherits a constructor from EPP::Host::Response

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class EPP::Host::Response

Instance Method Details

#addressesObject



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

def addresses
  @addresses ||= nodes_for_xpath('//host:addr').inject({}) do |hash, node|
    hash["ip#{node['ip']}"] ||= Array.new
    hash["ip#{node['ip']}"] << node.content.strip
    hash
  end
end

#client_idObject



22
23
24
# File 'lib/epp-client/host/info_response.rb', line 22

def client_id
  @clid ||= value_for_xpath('//host:clID')
end

#created_dateObject



28
29
30
# File 'lib/epp-client/host/info_response.rb', line 28

def created_date
  @crdate ||= value_for_xpath('//host:crDate') && Time.parse(value_for_xpath('//host:crDate'))
end

#creator_idObject



25
26
27
# File 'lib/epp-client/host/info_response.rb', line 25

def creator_id
  @crid ||= value_for_xpath('//host:crID')
end

#nameObject



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

def name
  @name ||= value_for_xpath('//host:name')
end

#roidObject



9
10
11
# File 'lib/epp-client/host/info_response.rb', line 9

def roid
  @roid ||= value_for_xpath('//host:roid')        
end

#statusObject



12
13
14
# File 'lib/epp-client/host/info_response.rb', line 12

def status
  @status ||= values_for_xpath('//host:status/@s')
end

#transfer_dateObject



37
38
39
# File 'lib/epp-client/host/info_response.rb', line 37

def transfer_date
  @trdate ||= value_for_xpath('//host:trDate') && Time.parse(value_for_xpath('//host:trDate'))
end

#updated_dateObject



34
35
36
# File 'lib/epp-client/host/info_response.rb', line 34

def updated_date
  @update ||= value_for_xpath('//host:upDate') && Time.parse(value_for_xpath('//host:upDate'))
end

#updator_idObject



31
32
33
# File 'lib/epp-client/host/info_response.rb', line 31

def updator_id
  @upid ||= value_for_xpath('//host:upID')
end