Ruby 2.7 adds shorthand syntax for arguments forwarding – Saeloun Blog
05-Dec-2019 4227
The idea of ... operator is to capture all and forward arguments irrespective of type. So we can forward single, keyword arguments or blocks.Its a shorthand syntax to forward everything. It acts similar to calling super without any arguments.Lets take a look at it with an example. Consider we define a method that accepts some regular, keyword and block arguments.
Ruby 2.7 adds shorthand syntax for arguments forwarding – Saeloun Blog #ruby #rubydeveloper #rubyonrails #shorthand #syntax #arguments #forwarding #Saeloun #blog https://rubyonrails.ba/link/ruby-2-7-adds-shorthand-syntax-for-arguments-forwarding-saeloun-blog