Class: Dreamy::Dns

Inherits:
Object
  • Object
show all
Includes:
EasyClassMaker
Defined in:
lib/dreamy/dns.rb

Class Method Summary collapse

Methods included from EasyClassMaker

included, #initialize

Class Method Details

.new_from_xml(xml) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/dreamy/dns.rb', line 7

def self.new_from_xml(xml)
  d = new
  d.  = (xml).at('account_id').innerHTML.to_i
  d.comment     = (xml).at('comment').innerHTML
  d.editable    = (xml).at('editable').innerHTML.to_i
  d.record      = (xml).at('record').innerHTML
  d.type        = (xml).at('type').innerHTML
  d.value       = (xml).at('value').innerHTML
  d.zone        = (xml).at('zone').innerHTML
  d
end