We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
@dheeraj, that's not the point though. I think this would be confusing to a newbie as well (and just look at all the confused people here in this discussion thread assuming that the range? method should be available to them on their local machines, for instance. Assuming like I did that perhaps it was some obscure part of std lib that they didn't know). Anyway, I was going through all of the examples to vet this tool as a part of our on-boarding / interview process at the company where I work. So I was thinking about this in the context of more entry-level folks as well.
I'd suggest updating the prose in your question to something more explicit like: "...by calling the method range? (which we have defined for you as a method in the context of this running example) on a and passing b and c as arguments.
I'd also show people the method signature so they really understand that it's only some custom method you defined here in this example.
Ruby Tutorial - Object Method Parameters
You are viewing a single comment's thread. Return to all comments →
@dheeraj, that's not the point though. I think this would be confusing to a newbie as well (and just look at all the confused people here in this discussion thread assuming that the range? method should be available to them on their local machines, for instance. Assuming like I did that perhaps it was some obscure part of std lib that they didn't know). Anyway, I was going through all of the examples to vet this tool as a part of our on-boarding / interview process at the company where I work. So I was thinking about this in the context of more entry-level folks as well.
I'd suggest updating the prose in your question to something more explicit like: "...by calling the method range? (which we have defined for you as a method in the context of this running example) on a and passing b and c as arguments.
I'd also show people the method signature so they really understand that it's only some custom method you defined here in this example.