On Sat, 26 Nov 2005, jlr8 wrote: > have run into a problem with Modules/Mixins that I can't seem to solve. > My problem is like this; I have a module with the instance method > validIndex? (and some constants) which is included into my other > classes; Board, Strategy and Player. > > module Common > > MAX_ENTRIES = 19682 > > def validIndex?(index) > if index >= 0 && index <= MAX_ENTRIES then > return true > else > return false > end > end > end > > Each Player has two Strategies and Boards represent these. When > creating a Board instance I can use validIndex?, however when creating > a Strategy or Player (which creates new Boards) I get: > > NoMethodError: undefined method `validIndex?' for Board:Class This suggests that you are trying to call validate on the class itself: Board.validIndex() rather than some instance aboard.validIndex() > > But when I check each classes instance methods I see validIndex? It would help to see the code where it's called, if that isn't the answer. Hugh