Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

nitinrajkumar451
Copy link
Contributor

What did you do?

Added a new blog about dynamic methods in ruby

Please include a summary of the changes.

  • Added this
  • Updated that

Why did you do it?

Why were these changes made?

  • This was missing
  • that needed changes

Screenshots (Please include if anything visual)

Include any relevant screenshots that may help explain the change.

```

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.
Copy link
Collaborator

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.
Copy link
Collaborator

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"

Copy link
Collaborator

@2KAbhishek 2KAbhishek left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants