Class: DX::Lookup::QRZ::Entity

Inherits:
Object
  • Object
show all
Defined in:
lib/dx/lookup/qrz/entity.rb

Class Method Summary collapse

Class Method Details

.from_response(xml) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/dx/lookup/qrz/entity.rb', line 18

def self.from_response(xml)
  Entity.new(
    :dxcc => xml['dxcc'],
    :code_short => xml['cc'],
    :code_long => xml['ccc'],
    :name => xml['name'],
    :continent => xml['continent'],
    :itu_zone => xml['ituzone'],
    :cq_zone => xml['cqzone'],
    :time_zone => xml['timezone'],
    :coordinate => [xml['lat'], xml['lon']],
    :notes => xml['notes']
  )
end