diff options
Diffstat (limited to 'ext/win32ole/lib')
-rw-r--r-- | ext/win32ole/lib/win32ole.rb | 25 |
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 0000000000..30319b55a3 --- /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 |