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
pharrington wrote:
> On Aug 13, 10:19am, Cris Shupp <cshu... / yahoo.com> wrote:
>> I should mention that I am seeing these 'dangling' calls more and more
>> as I look through what the scaffolding generated so I would like a clue!
>>
>> Thanks,
>>
>> Cris
>> --
>> Posted viahttp://www.ruby-forum.com/.
>
> Is it the fact that the method calls aren't happening within another
> method tripping you up? In Ruby, most everything happens at runtime,
> class creation included. Also, everything's an object. So when
> something like
>
> class Foo; some_ish; end
>
> happens, Ruby is creating a new class, and some_ish is just being run
> in the instance of the Class that is being created. (well it *is* more
> complicated than that, but that should be enough to help understand
> whats going on?). Its really no different than attr_accessor and
> friends.
--
Posted via http://www.ruby-forum.com/.