Class: Spreedly::ReceiverClass

Inherits:
Object
  • Object
show all
Includes:
Fields
Defined in:
lib/spreedly/receiver_class.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Fields

#field_hash, included, #initialize_fields

Constructor Details

#initialize(xml_doc) ⇒ ReceiverClass

Returns a new instance of ReceiverClass.



8
9
10
# File 'lib/spreedly/receiver_class.rb', line 8

def initialize(xml_doc)
  initialize_fields(xml_doc)
end

Class Method Details

.new_list_from(xml_doc) ⇒ Object



12
13
14
15
16
17
# File 'lib/spreedly/receiver_class.rb', line 12

def self.new_list_from(xml_doc)
  receivers = xml_doc.xpath('.//receivers/receiver')
  receivers.map do |each|
    self.new(each)
  end
end