module SOAP::Mapping::SchemaComplexTypeDefinition

Public Class Methods

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

Public Instance Methods

<<(ele) click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 52
def <<(ele)
  @content << ele
end
as_any?() click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 66
def as_any?
  false
end
as_array?() click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 70
def as_array?
  false
end
each() { |ele| ... } click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 56
def each
  @content.each do |ele|
    yield ele
  end
end
find_element(qname) click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 74
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 48
def is_concrete_definition
  true
end
size() click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 62
def size
  @content.size
end

Private Instance Methods

search_element(qname) click to toggle source
# File lib/soap/mapping/schemadefinition.rb, line 80
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