Represents a collection of IIS configuration objects.
# File lib/inetmgr/iis_object_collection.rb, line 19 def [](index) return @type.new @collection_element.Item index end
# File lib/inetmgr/iis_object_collection.rb, line 27 def add e = @collection_element.CreateNewElement @item_name.to_s added = @type.new e @add_callback.call added unless @add_callback.nil? yield added @collection_element.AddElement e added end
# File lib/inetmgr/iis_object_collection.rb, line 15
def count
size
end
# File lib/inetmgr/iis_object_collection.rb, line 23
def each
size.times { |i| yield self[i] }
end
# File lib/inetmgr/iis_object_collection.rb, line 44
def exists(name)
!(find {|s| s.name == name}).nil?
end
# File lib/inetmgr/iis_object_collection.rb, line 36
def find
size.times do |i|
instance = self[i]
return instance if yield(instance)
end
nil
end
Generated with the Darkfish Rdoc Generator 2.