* ext/win32ole/lib/win32ole.rb :add WIN32OLE#methods. WIN32OLE might work

well with did_you_mean gem.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
suke 2017-11-03 06:07:24 +00:00
Родитель 1f67ebd5a7
Коммит 93ae434772
1 изменённых файлов: 25 добавлений и 0 удалений

Просмотреть файл

@ -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