Flowdock
method

child_type

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: WSDL::XMLSchema::ComplexType
child_type(name = nil) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/wsdl/soap/complexType.rb, line 49
  def child_type(name = nil)
    case compoundtype
    when :TYPE_STRUCT
      if ele = find_element(name)
        ele.type
      elsif ele = find_element_by_name(name.name)
        ele.type
      end
    when :TYPE_ARRAY
      @contenttype ||= content_arytype
    when :TYPE_MAP
      item_ele = find_element_by_name("item") or
        raise RuntimeError.new("'item' element not found in Map definition.")
      content = item_ele.local_complextype or
        raise RuntimeError.new("No complexType definition for 'item'.")
      if ele = content.find_element(name)
        ele.type
      elsif ele = content.find_element_by_name(name.name)
        ele.type
      end
    else
      raise NotImplementedError.new("Unknown kind of complexType.")
    end
  end
Register or log in to add new notes.