Sha256: 5a96ecb58e964a67ec37619b088b4b31e89c898ff02fc233b2b43475c4cb71c2

Contents?: true

Size: 1.23 KB

Versions: 6

Compression:

Stored size: 1.23 KB

Contents

module Dreamy
  class Domain
    include EasyClassMaker

    attributes  :account_id, :domain, :fastcgi, :home, :hosting_type, :outside_url, :passenger,
                :path, :php, :php_fcgid, :security, :type, :unique_ip, :user, :www_or_not, :xcache

    def self.new_from_xml(xml)
      d = new
      d.account_id    = (xml).at('account_id').innerHTML
      d.domain        = (xml).at('domain').innerHTML
      d.fastcgi       = (xml).at('fastcgi').innerHTML
      d.home          = (xml).at('home').innerHTML
      d.hosting_type  = (xml).at('hosting_type').innerHTML
      d.outside_url   = (xml).at('outside_url').innerHTML
      d.passenger     = (xml).at('passenger').innerHTML
      d.path          = (xml).at('path').innerHTML
      d.php           = (xml).at('php').innerHTML
      d.php_fcgid     = (xml).at('php_fcgid').innerHTML
      d.security      = (xml).at('security').innerHTML
      d.type          = (xml).at('type').innerHTML
      d.unique_ip     = (xml).at('unique_ip').innerHTML
      d.user          = (xml).at('user').innerHTML
      d.www_or_not    = (xml).at('www_or_not').innerHTML
      d.xcache        = (xml).at('xcache').innerHTML
      d
    end
    
    def short_home
      home.gsub(".Dreamy.com","")
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sant0sk1-dreamy-0.1.1 lib/dreamy/domain.rb
sant0sk1-dreamy-0.1.2 lib/dreamy/domain.rb
sant0sk1-dreamy-0.2.0 lib/dreamy/domain.rb
sant0sk1-dreamy-0.2.1 lib/dreamy/domain.rb
sant0sk1-dreamy-0.2.2 lib/dreamy/domain.rb
sant0sk1-dreamy-0.2.3 lib/dreamy/domain.rb