How does the send method work and when would you use it?
Last updated
sendcalls a method by name (symbol or string), forwarding arguments and block:obj.send(:m, a)equalsobj.m(a).It bypasses access control and can call
privatemethods. Usepublic_sendto respect visibility.Use it for dynamic dispatch when the method is chosen at runtime (from a variable or config), and in metaprogramming/DSLs.
- https://www.it-jobs-nl.com/ruby-developer/
- https://www.bacancytechnology.com/blog/outsource-ruby-on-rails-development
- https://blog.nextideatech.com/how-to-hire-the-best-ruby-on-rails-developers-the-complete-guide/
- https://ubiminds.com/en-us/ruby-on-rails-developers/
- https://dataford.io/interview-guides/pattern/software-engineer