How does the send method work and when would you use it?

Last updated 27 June 2026

  • send calls a method by name (symbol or string), forwarding arguments and block: obj.send(:m, a) equals obj.m(a).

  • It bypasses access control and can call private methods. Use public_send to 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
All Ruby interview questions