8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/dreamy/domain.rb', line 8
def self.new_from_xml(xml)
d = new
d.account_id = (xml).at('account_id').innerHTML.to_i
d.domain = (xml).at('domain').innerHTML
d.home = (xml).at('home').innerHTML
d.type = (xml).at('type').innerHTML
d.unique_ip = (xml).at('unique_ip').innerHTML
if d.type == 'http'
d.fastcgi = (xml).at('fastcgi').innerHTML.to_i
d.hosting_type = (xml).at('hosting_type').innerHTML
d.outside_url = (xml).at('outside_url').innerHTML
d.passenger = (xml).at('passenger').innerHTML.to_i
d.path = (xml).at('path').innerHTML
d.php = (xml).at('php').innerHTML
d.php_fcgid = (xml).at('php_fcgid').innerHTML.to_i
d.security = (xml).at('security').innerHTML.to_i
d.user = (xml).at('user').innerHTML
d.www_or_not = (xml).at('www_or_not').innerHTML
d.xcache = (xml).at('xcache').innerHTML.to_i
end
d
end
|