New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADD: Dynamic methods in ruby #180
base: main
Are you sure you want to change the base?
Conversation
``` | ||
|
||
Method can be called using dot notation but this restricts making the method call being dynamic. | ||
There is another way to call a method that is using `send`. It accepts method name and it's arguments as arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the class.method("method_name").call should also be included here and a one liner about how it differs from send
``` | ||
|
||
Method can be called using dot notation but this restricts making the method call being dynamic. | ||
There is another way to call a method that is using `send`. It accepts method name and it's arguments as arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of "it's arguments as arguments"
"the method's arguments as it own arguments"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments, looks good over all
I'll recommend running prettier on the file once before merging
Co-authored-by: Abhishek Keshri <iam2kabhishek@gmail.com>
What did you do?
Added a new blog about dynamic methods in ruby
Please include a summary of the changes.
Why did you do it?
Why were these changes made?
Screenshots (Please include if anything visual)
Include any relevant screenshots that may help explain the change.