[Ironruby-core] Getting value of IronRuby object's property using reflections

Tomas Matousek Tomas.Matousek at microsoft.com
Mon Apr 25 23:14:00 EDT 2011


Would this be what you need?
http://ironruby.codeplex.com/workitem/4920

Tomas

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of sridharans sivamurugan
Sent: Monday, April 25, 2011 7:38 PM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] Getting value of IronRuby object's property using reflections

hi All,

I'm having the ruby class of following structure. I need to gets its value using reflection that it need to get its value using Property Descriptor or PropertyInfo collection. I can get this only when I use the attributes. If I have the object without any attributes its returning the public methods of the Ruby object.  I need to get the properties using Property Descriptor, when there is no attributes in the object.

Please share your Idea this is important for my project.

Thanks.
Sri

Class Structure

class Person

    def name
        @name
    end

    def name=(n)
        @name = n
    end

    def age
        @age
    end

    def age=(a)
        @age = a
    end
end

--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core






More information about the Ironruby-core mailing list