summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/win32ole/lib/win32ole.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/ext/win32ole/lib/win32ole.rb b/ext/win32ole/lib/win32ole.rb
new file mode 100644
index 0000000..30319b5
--- /dev/null
+++ b/ext/win32ole/lib/win32ole.rb
@@ -0,0 +1,25 @@
+begin
+ require 'win32ole.so'
+rescue LoadError
+ # do nothing
+end
+
+if defined?(WIN32OLE)
+ # WIN32OLE
+ class WIN32OLE
+
+ #
+ # By overriding Object#methods, WIN32OLE might
+ # work well with did_you_mean gem.
+ # This is exprimental.
+ #
+ # require 'win32ole'
+ # dict = WIN32OLE.new('Scripting.Dictionary')
+ # dict.Ade('a', 1)
+ # #=> Did you mean? Add
+ #
+ def methods(*args)
+ super + ole_methods.map(&:name)
+ end
+ end
+end