ruby-changes:48515
From: suke <ko1@a...>
Date: Fri, 3 Nov 2017 15:07:28 +0900 (JST)
Subject: [ruby-changes:48515] suke:r60630 (trunk): * ext/win32ole/lib/win32ole.rb :add WIN32OLE#methods. WIN32OLE might work
suke 2017-11-03 15:07:24 +0900 (Fri, 03 Nov 2017) New Revision: 60630 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60630 Log: * ext/win32ole/lib/win32ole.rb :add WIN32OLE#methods. WIN32OLE might work well with did_you_mean gem. Added files: trunk/ext/win32ole/lib/win32ole.rb Index: ext/win32ole/lib/win32ole.rb =================================================================== --- ext/win32ole/lib/win32ole.rb (nonexistent) +++ ext/win32ole/lib/win32ole.rb (revision 60630) @@ -0,0 +1,25 @@ https://github.com/ruby/ruby/blob/trunk/ext/win32ole/lib/win32ole.rb#L1 +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 Property changes on: ext/win32ole/lib/win32ole.rb ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/