What am I missing with this code to get it to run if I remove the comment from the end and run that as code?
When I run this with the method string commented out, it provides the expected results. When I make the last line code instead of comment, this is the error I receive: undefined method `method1’ for “Melinda”:String
Did you mean? method
methods
I have tried to define each method as a String, and it gives me a different error. Any guidance would be great. Thanks!!!
The calls on the individual objects is not where I am having trouble. I can not get the combined methods to work. I adjusted the code to put the methods in the same format as suggested. It does not change that the output does not function. The methods each produce the expected outcome. When I remove the comment and try to run the last line, it throws the error.