Class: Array

Inherits:
Object show all
Defined in:
lib/rapuncel/core_ext/array.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_xml_rpc(xml_node) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/rapuncel/core_ext/array.rb', line 16

def self.from_xml_rpc xml_node
  values = xml_node.first_element_child.element_children

  values.map do |value|
    Object.from_xml_rpc value.first_element_child
  end
end

Instance Method Details

#to_xml_rpc(b = Rapuncel.get_builder) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/rapuncel/core_ext/array.rb', line 2

def to_xml_rpc b = Rapuncel.get_builder
  b.array do |b|
    b.data do |b|
      each do |array_entry|
        b.value do |b|
          array_entry.to_xml_rpc b
        end
      end
    end
  end

  b.to_xml
end