Forum: IronRuby Enumerate CLR methods

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Alex 2. (Guest)
on 2009-01-08 02:36
Hello,

How to enumerate the CLR object methods?

I whould like to write some thing like this:

  - - -
  require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'
  include System::Windows::Forms
  p Form.new.methods.sort
  - - -

and to see methods like: show, show_dialog, ...

- Alex
Ivan P. (Guest)
on 2009-01-08 09:51
(Received via mailing list)
instance.class.to_clr_type.get_methods.collect { |m| m.name.to_s
}.uniq.sort.each { |m| p m }

or Form.to_clr_type.get_methods.collect { |m| m.name.to_s
}.uniq.sort.each {
|m| p m }
Tomas M. (Guest)
on 2009-01-08 18:05
(Received via mailing list)
Module#methods doesn’t return .NET members right now. It should. Filed a
bug #23493.

Tomas

From: removed_email_address@domain.invalid
[mailto:removed_email_address@domain.invalid] On Behalf Of Ivan Porto
Carrero
Sent: Wednesday, January 07, 2009 11:35 PM
To: removed_email_address@domain.invalid
Subject: Re: [Ironruby-core] Enumerate CLR methods

instance.class.to_clr_type.get_methods.collect { |m| m.name.to_s
}.uniq.sort.each { |m| p m }

or Form.to_clr_type.get_methods.collect { |m| m.name.to_s
}.uniq.sort.each { |m| p m }
On Thu, Jan 8, 2009 at 1:36 AM, Alex 2k8
<removed_email_address@domain.invalid<mailto:removed_email_address@domain.invalid>> 
wrote:
Hello,

How to enumerate the CLR object methods?

I whould like to write some thing like this:

 - - -
 require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'
 include System::Windows::Forms
 p Form.new.methods.sort
 - - -

and to see methods like: show, show_dialog, ...

- Alex
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ironruby-core mailing list
removed_email_address@domain.invalid<mailto:removed_email_address@domain.invalid>
http://rubyforge.org/mailman/listinfo/ironruby-core
This topic is locked and can not be replied to.