Class: Dreamy::MailFilter

Inherits:
Object
  • Object
show all
Includes:
EasyClassMaker
Defined in:
lib/dreamy/mail_filter.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
18
19
# File 'lib/dreamy/mail_filter.rb', line 7

def self.new_from_xml(xml)
  f = new
  f.        = (xml).at('account_id').innerHTML.to_i
  f.address           = (xml).at('address').innerHTML
  f.rank              = (xml).at('rank').innerHTML.to_i
  f.filter            = (xml).at('filter').innerHTML
  f.filter_on         = (xml).at('filter_on').innerHTML
  f.action            = (xml).at('action').innerHTML
  f.action_value      = (xml).at('action_value').innerHTML
  f.contains          = (xml).at('contains').innerHTML
  f.stop              = (xml).at('stop').innerHTML
  f
end