You should read about the difference between `include' and `extend'
keywords.

module MakeMethod
    def make_method( name )
       define_method( name ) do |count|
          puts "you called method #{name.to_s}"
          puts "the count is #{count}"
       end
    end
end

class Person
    extend MakeMethod
    make_method :hello
end

Robert Pankowecki

-- 
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.

Reply via email to