Sha256: 42d516a2dc7d06adb447b405eb77b0396bbf772f93d7461ca41dabb795185975

Contents?: true

Size: 719 Bytes

Versions: 7

Compression:

Stored size: 719 Bytes

Contents

module Dreamy
  class User
    include EasyClassMaker

    attributes  :account_id, :disk_used_mb, :gecos, :home, :password, :quota_mb, :shell, :type, :username

    def self.new_from_xml(xml)
      u = new
      u.account_id    = (xml).at('account_id').innerHTML
      u.disk_used_mb  = (xml).at('disk_used_mb').innerHTML
      u.gecos         = (xml).at('gecos').innerHTML
      u.home          = (xml).at('home').innerHTML
      u.password      = (xml).at('password').innerHTML
      u.quota_mb      = (xml).at('quota_mb').innerHTML
      u.shell         = (xml).at('shell').innerHTML
      u.type          = (xml).at('type').innerHTML
      u.username      = (xml).at('username').innerHTML
      u
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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