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.
E1e2dd8c03c8e9e0680cfd802df0a04b?d=identicon&s=25 Alex 2k8 (alex_2k8)
on 2009-01-08 01: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
1e39a948a58f4569c53d971c2e120920?d=identicon&s=25 Ivan Porto carrero (casualjim)
on 2009-01-08 08: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 }
Cb51033949ffccd982ae32c9f890f25a?d=identicon&s=25 Tomas Matousek (Guest)
on 2009-01-08 17:05
(Received via mailing list)
Module#methods doesn’t return .NET members right now. It should. Filed a
bug #23493.

Tomas

From: ironruby-core-bounces@rubyforge.org
[mailto:ironruby-core-bounces@rubyforge.org] On Behalf Of Ivan Porto
Carrero
Sent: Wednesday, January 07, 2009 11:35 PM
To: ironruby-core@rubyforge.org
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
<lists@ruby-forum.com<mailto:lists@ruby-forum.com>> 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
Ironruby-core@rubyforge.org<mailto:Ironruby-core@rubyforge.org>
http://rubyforge.org/mailman/listinfo/ironruby-core
This topic is locked and can not be replied to.