Class: Dreamy::MysqlUser

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

Class Method Summary collapse

Methods included from EasyClassMaker

included, #initialize

Class Method Details

.new_from_xml(xml) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/dreamy/mysql/user.rb', line 8

def self.new_from_xml(xml)
  u = new
  u. = (xml).at('account_id').innerHTML.to_i
  u.db         = (xml).at('db').innerHTML
  u.home       = (xml).at('home').innerHTML
  u.username   = (xml).at('username').innerHTML
  u.host       = (xml).at('host').innerHTML
  u.select     = (xml).at('select_priv').innerHTML
  u.insert     = (xml).at('insert_priv').innerHTML
  u.update     = (xml).at('update_priv').innerHTML
  u.delete     = (xml).at('delete_priv').innerHTML
  u.create     = (xml).at('create_priv').innerHTML
  u.drop       = (xml).at('drop_priv').innerHTML
  u.index      = (xml).at('index_priv').innerHTML
  u.alter      = (xml).at('alter_priv').innerHTML
  u
end