I got a Singleton Class like
module Database
class Table
include Singleton
# ...
end
end
And in this Class I’m using in a method the define_method-method and get:
/home/jrn/Development/RocketRuby/lib/modules/database.rb:184:in `block in register_methods': undefined method `define_method' for #<Accounting::UsersTable:0x00000001f103c8> (NoMethodError)
(As you can see, the Class Table has been inherited by a Class called UsersTable in the Module Accounting)
What might gone wrong? What are typical mistakes when working with define_methods and Singleton?
Yours, Joern
Have you tried something like this?