In PHP I can do this within a class’s method:
Condition::evaluate($this, $primaryCondition);
This allows me to pass the entire instance of the class to a different class via $this. How can I achieve the same in Ruby?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In ruby you have a
selfkeyword. You can read about it in this article, it explains howselfbehave in different contexts.