Class: Handsoap::XmlMason::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/jiraSOAP/handsoap_extensions.rb

Overview

A node in a Nokogiri XML document.

Instance Method Summary collapse

Instance Method Details

#add_complex_array(node_name, array = [], options = {}) ⇒ Object

TODO:

Make this method recursive

Parameters:

  • node_name (String)
  • array (Array) (defaults to: [])
  • options (Hash) (defaults to: {})


25
26
27
28
29
# File 'lib/jiraSOAP/handsoap_extensions.rb', line 25

def add_complex_array(node_name, array = [], options = {})
  prefix, name = parse_ns(node_name)
  node = append_child Element.new(self, prefix, name, nil, options)
  array.each { |element| element.soapify_for node, name }
end

#add_simple_array(node_name, array = [], options = {}) ⇒ Object

TODO:

Make this method recursive

Parameters:

  • node_name (String)
  • array (Array) (defaults to: [])
  • options (Hash) (defaults to: {})


15
16
17
18
19
# File 'lib/jiraSOAP/handsoap_extensions.rb', line 15

def add_simple_array(node_name, array = [], options = {})
  prefix, name = parse_ns(node_name)
  node = append_child Element.new(self, prefix, name, nil, options)
  array.each { |element| node.add node_name, element }
end