obj = SomeObject.new def obj.new_method \"do some things\" end puts obj.new_method > \"do some things\"
This works ok. However, I need to do
You can use modules.
module ObjSingletonMethods def new_method "do some things" end end obj.extend ObjSingletonMethods puts obj.new_method # => do some things
Now if you need to add more methods to that object, you just need to implement the methods in the module and you are done.