module SOAP::Mapping::SchemaComplexTypeDefinition

Public Class Methods

new() click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 42
def initialize
  @content = []
  @element_cache = {}
end

Public Instance Methods

<<(ele) click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 51
def <<(ele)
  @content << ele
end
as_any?() click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 65
def as_any?
  false
end
as_array?() click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 69
def as_array?
  false
end
each() { |ele| ... } click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 55
def each
  @content.each do |ele|
    yield ele
  end
end
find_element(qname) click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 73
def find_element(qname)
  @element_cache[qname] ||= search_element(qname)
end
is_concrete_definition() click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 47
def is_concrete_definition
  true
end
size() click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 61
def size
  @content.size
end

Private Instance Methods

search_element(qname) click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 79
def search_element(qname)
  each do |ele|
    if ele.respond_to?(:find_element)
      found = ele.find_element(qname)
      return found if found
    else
      # relaxed match
      if ele.elename == qname or
          (qname.namespace.nil? and ele.elename.name == qname.name)
        return ele
      end
    end
  end
  nil
end