(Without repeating the example definitions from the previous post) > For module SX3, is the class Tasklist, Request and Dictionary can call > method_1-3? >
The inheritance hierarchy for Tasklist is: Tasklist < RemoteSX3Model < GenericModel < ActiveRecord::Base This class can use methods defined in Tasklist (its self), RemoteSX3Model, GenericModel, and ActiveRecord::Base. If the same method is defined in more than one of these classes, Tasklist will use the "closest" definition it finds, tracing from Tasklist to ActiveRecord::Base. The same logic holds for Request, and Dictionary. > > For module SX4, is the class Tasklist can only call method_2 defined in > GenericModel, but not method_1 and method_2? > Nope, Tasklist from SX4 will use its "method_2" (which takes no parameters), but method_1 and method_3 are still available via the Tasklist < RemoteSX4 < GenericModel path. > For module SX5, is the class Tasklist can only call method_2, and the > return value is 110? Tasklist from SX5 can still employ method_1 and method_3, but will use its definition of method_2, with a different default for a. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

