Class: WIN32OLE
- Inherits:
-
Object
- Object
- WIN32OLE
- Defined in:
- lib/vapir-ie/win32ole.rb
Overview
necessary extension of win32ole
Instance Method Summary collapse
-
#object_respond_to?(method) ⇒ Boolean
checks if WIN32OLE#ole_method returns an WIN32OLE_METHOD, or errors.
- #respond_to?(method) ⇒ Boolean
Instance Method Details
#object_respond_to?(method) ⇒ Boolean
checks if WIN32OLE#ole_method returns an WIN32OLE_METHOD, or errors. WARNING: #ole_method is pretty slow, and consequently so is this. you are likely to be better off just calling a method you are not sure exists, and rescuing the WIN32OLERuntimeError that is raised if it doesn’t exist.
26 27 28 29 30 31 32 33 |
# File 'lib/vapir-ie/win32ole.rb', line 26 def object_respond_to?(method) method=method.to_s # strip assignment = from methods. going to assume that if it has a getter method, it will take assignment, too. this may not be correct, but will have to do. if method =~ /=\z/ method=$` end respond_to_cache[method] end |
#respond_to?(method) ⇒ Boolean
18 19 20 |
# File 'lib/vapir-ie/win32ole.rb', line 18 def respond_to?(method) super || object_respond_to?(method) end |