KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I would like to know if I could force this to happen class A def bomb ; "bomb" ; end end class B ; end bomb = A.instance_method(:bomb) b = B.new bomb.bind(b) currently it throws the error TypeError: bind argument must be an instance of A I find this very limiting concerning what I can do with these unbound methods, the possibilities are a bit limiting. In cases like these (and I'm not referring only to idempotent functions) it would make sense right? And an execution error would have sufficed, In case I would be handling variables from A which are not replicated in B. I'd really like to know how to force this bind.
Tags (comma-separated)
Save Edits
Cancel