Answer the question
In order to leave comments, you need to log in
Hook to create a class in Ruby?
Let's say there is a class in it there is initialization and all that. After creating the class, I need to call a hook with arbitrary code that calls the methods of the class, but on the condition that I cannot write this in the class description itself.
And here I mean not the creation of an instance of the class, but the initialization of the class itself.
For example:
class SomeClass < ActiveRecord
call_some_method('bla_bla_bla')
def some_method
return 1
end
# end of initialization
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question