Forum: Ruby instace_methods

5dfc843f9ecf6fb64b52a35bdce43910?d=identicon&s=25 Raja gopalan (arc)
on 2014-01-29 10:47
hi,
class Raj
   def hi
        puts 'hi'
   end
end

If I write code "puts Raj.instance_methods(false)"it prints the
functions available in Raj class, so here output would be 'hi'

My question is, consider the below code of mine

save_dialog = WIN32OLE.new("AutoItX3.Control")
excel = WIN32OLE.connect("excel.application")

As I have explained in my example, I would like to have methods which
are specific to save_dialg and excel. The problem here is, If I write
the code like

"puts save_dialog.class.instance_methods(false)"
        It is returning the methods which is available in WIN32OLE, but
how do I get the methods which are specific to save_dialog and excel?
14b5582046b4e7b24ab69b7886a35868?d=identicon&s=25 Joel Pearson (virtuoso)
on 2014-01-29 12:10
You use excel.ole_methods
5dfc843f9ecf6fb64b52a35bdce43910?d=identicon&s=25 Raja gopalan (arc)
on 2014-01-29 12:15
hi Joel,

thank you, I was using puts

WIN32OLE.connect("excel.application").ole_func_methods. could you
explain me what's the difference?
5dfc843f9ecf6fb64b52a35bdce43910?d=identicon&s=25 Raja gopalan (arc)
on 2014-01-29 12:23
hi  Joel Pearson

Where can I find the documentation of those functions? How would I know
how to use those functions?
14b5582046b4e7b24ab69b7886a35868?d=identicon&s=25 Joel Pearson (virtuoso)
on 2014-01-29 13:38
There is a great blog which can get you started here:
http://rubyonwindows.blogspot.co.uk/2007/03/automa...

The documentation for individual OLE methods will be in MSDN:
http://msdn.microsoft.com/en-us/library/wss56bz7.aspx

The documentation for WIN32OLE is here:
http://ruby-doc.org/stdlib-1.9.3/libdoc/win32ole/r...
5dfc843f9ecf6fb64b52a35bdce43910?d=identicon&s=25 Raja gopalan (arc)
on 2014-01-29 13:57
hi  Joel Pearson

Thank you.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.