Sha256: 7a486054b15be9846e4962609e7d7c1f2d0e40c1734c294ab073063ea5a1bba9
Contents?: true
Size: 644 Bytes
Versions: 12
Compression:
Stored size: 644 Bytes
Contents
require 'runner' module IISConfig class IISObject def exist?(type, name) args = [] args << 'LIST' args << type.to_s.upcase args << '/xml' result = Runner.execute_command args exists = false doc = REXML::Document.new(result) doc.elements.each("appcmd/#{type.to_s.upcase}[@#{type.to_s.upcase}.NAME='#{name}']") do exists = true break end exists end protected def add_instance(collection, type, block) instance = type.new collection << instance block.call instance if block end end end
Version data entries
12 entries across 12 versions & 1 rubygems