On Thu, Mar 12, 2009 at 4:38 AM, wesley chen <cjq....@gmail.com> wrote:
> Thanks, :), it is exactly what I want. > > I ask this kind of questions because I find, in my code, I use too many: > include module. > When I include the module into the class, all the methods in the module > comes into the class's method. That's terrible. to remove the 'terrible' from listing do this use Object.local_methods patch. class Object def local_methods (methods - Object.instance_methods).sort end end so if you have class Foo def foo 'foo' end end then Bla.new.local_methods #=> ['foo'] if you want methods defined only as instances of that object. useful. Wirble uses it for irb inspection http://pablotron.org/software/wirble/ marekj Watirloo: Semantic Page Objects in UseCases Human Readable Machine Executable Acceptance Testing http://github.com/marekj/watirloo/ > > > > Thanks. > Wesley Chen. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---