# File lib/xsd/namedelements.rb, line 73 def +(rhs) o = NamedElements.new o.elements = @elements + rhs.elements @cache.clear o end
# File lib/xsd/namedelements.rb, line 62 def <<(rhs) @elements << rhs self end
# File lib/xsd/namedelements.rb, line 40 def [](idx) if idx.is_a?(Numeric) @elements[idx] else @cache[idx] ||= @elements.find { |item| item.name == idx } end end
# File lib/xsd/namedelements.rb, line 80 def concat(rhs) @elements.concat(rhs.elements) @cache.clear self end
# File lib/xsd/namedelements.rb, line 67 def delete(rhs) rv = @elements.delete(rhs) @cache.clear rv end
# File lib/xsd/namedelements.rb, line 20 def dup o = NamedElements.new o.elements = @elements.dup o end
# File lib/xsd/namedelements.rb, line 56 def each @elements.each do |element| yield(element) end end
# File lib/xsd/namedelements.rb, line 97 def find_all o = NamedElements.new each do |ele| o << ele if yield(ele) end o end
# File lib/xsd/namedelements.rb, line 48 def find_name(name) @elements.find { |item| item.name.name == name } end
# File lib/xsd/namedelements.rb, line 26 def freeze super @elements.freeze self end
# File lib/xsd/namedelements.rb, line 52 def keys collect { |element| element.name } end
Generated with the Darkfish Rdoc Generator 2.