summaryrefslogtreecommitdiff
path: root/ext/win32ole/lib
diff options
context:
space:
mode:
Diffstat (limited to 'ext/win32ole/lib')
-rw-r--r--ext/win32ole/lib/win32ole.rb3
-rw-r--r--ext/win32ole/lib/win32ole/property.rb18
2 files changed, 16 insertions, 5 deletions
diff --git a/ext/win32ole/lib/win32ole.rb b/ext/win32ole/lib/win32ole.rb
index d7034f7845..f5c8a52c4a 100644
--- a/ext/win32ole/lib/win32ole.rb
+++ b/ext/win32ole/lib/win32ole.rb
@@ -5,7 +5,6 @@ rescue LoadError
end
if defined?(WIN32OLE)
- # WIN32OLE
class WIN32OLE
#
@@ -26,7 +25,7 @@ if defined?(WIN32OLE)
def ole_methods_safely
ole_methods
- rescue WIN32OLEQueryInterfaceError
+ rescue WIN32OLE::QueryInterfaceError
[]
end
end
diff --git a/ext/win32ole/lib/win32ole/property.rb b/ext/win32ole/lib/win32ole/property.rb
index fea047cd19..558056b32b 100644
--- a/ext/win32ole/lib/win32ole/property.rb
+++ b/ext/win32ole/lib/win32ole/property.rb
@@ -1,7 +1,12 @@
# frozen_string_literal: false
-# OLEProperty
-# helper class of Property with arguments.
-class OLEProperty
+
+class WIN32OLE
+end
+
+# OLEProperty is a helper class of Property with arguments, used by
+# `olegen.rb`-generated files.
+class WIN32OLE::Property
+ # :stopdoc:
def initialize(obj, dispid, gettypes, settypes)
@obj = obj
@dispid = dispid
@@ -14,4 +19,11 @@ class OLEProperty
def []=(*args)
@obj._setproperty(@dispid, args, @settypes)
end
+ # :stopdoc:
+end
+
+module WIN32OLE::VariantType
+ # Alias for `olegen.rb`-generated files, that should include
+ # WIN32OLE::VARIANT.
+ OLEProperty = WIN32OLE::Property
end