From: pharrington Date: 2009-08-14T03:50:05+09:00 Subject: Re: skip_before_filter (Do I need a lesson in modules/mixins?) On Aug 13, 2:40 pm, Cris Shupp wrote: > No it is not the fact that the method call is not within another method > call that is tripping me up.  It is that I cannot get it to work for me. > > Consider the following code: > #################################### > module Test > >   def self.include(base) >     base.extend(ClassMethods) >   end > >   module ClassMethods >     def call_me >       puts "Class method" >     end >   end > end > > class Tester >   include Test >  call_me#toy.rb:23: undefined method `call_me' for > Tester:Class(NoMethodError) > end > > Tester.new > ################################### > > yields the following results: > toy.rb:24: undefined local variable or method `call_me' for Tester:Class > (NameError) > > Again I am assuming my 'call_me' is equivalent to my originally > referenced 'skip_before_filter'. > > Thanks, > > Cris > Then I'm confused as to what you're still confused about? Jesus already pointed out the typo: you need def self.included(base) versus > def self.include(base)