lib/inetmgr/iis_object.rb in inetmgr-0.6.0 vs lib/inetmgr/iis_object.rb in inetmgr-0.7.0

- old
+ new

@@ -1,6 +1,7 @@ -# Represents an IIS configuration element. Serves as the base class for all +module Inetmgr + # Represents an IIS configuration element. Serves as the base class for all # IIS artifacts like Site, Application and VirtualDirectory. class IisObject def initialize element @element = element @@ -55,11 +56,11 @@ end end def invoke_method name method = @element.Methods.Item(name.to_s).CreateInstance() - + # TODO: if block_given? change method_missing to change this: # method.Input.Properties.Item("key").Value = value # in to this: # method.key = value @@ -70,16 +71,18 @@ private def method_missing(symbol, *args) name = symbol.to_s.to_camel_case if (/=$/.match(name)) - + @element.Properties.Item(name.sub(/=$/, '')).Value = args[0] else @element.Properties.Item(name).Value end rescue WIN32OLERuntimeError raise "property '#{symbol}' -> #{$!}" end end + +end \ No newline at end of file