[Ironruby-core] Enumerate CLR methods

Ivan Porto Carrero ivan at flanders.co.nz
Thu Jan 8 02:34:38 EST 2009


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 at 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 at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090108/a6ea82b9/attachment.html>


More information about the Ironruby-core mailing list