Sha256: bd834946d4d3a8efd69812d44d6b512f362bc4011f59e3a5087f99d19188985e

Contents?: true

Size: 654 Bytes

Versions: 8

Compression:

Stored size: 654 Bytes

Contents

module Dreamy
  class AnnounceList
    include EasyClassMaker

    attributes  :account_id, :name, :domain, :short_name, :start_date, :max_bounces, :subscribers

    def self.new_from_xml(xml)
      l = new
      l.account_id      = (xml).at('account_id').innerHTML.to_i
      l.short_name      = (xml).at('listname').innerHTML
      l.domain          = (xml).at('domain').innerHTML
      l.name            = (xml).at('name').innerHTML
      l.start_date      = (xml).at('start_date').innerHTML
      l.max_bounces     = (xml).at('max_bounces').innerHTML.to_i
      l.subscribers     = (xml).at('num_subscribers').innerHTML.to_i
      l
    end
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
jordan-brough-dreamy-0.5.1 lib/dreamy/announce_list.rb
sant0sk1-dreamy-0.3.0 lib/dreamy/announce_list.rb
sant0sk1-dreamy-0.4.1 lib/dreamy/announce_list.rb
sant0sk1-dreamy-0.5.0 lib/dreamy/announce_list.rb
sant0sk1-dreamy-0.5.1 lib/dreamy/announce_list.rb
dreamy-0.5.3 lib/dreamy/announce_list.rb
dreamy-0.5.2 lib/dreamy/announce_list.rb
dreamy-0.5.1 lib/dreamy/announce_list.rb