I am executing a class with only this code in rubymine:
def saythis(x)
puts x
end
saythis('words')
It returns an error: undefined method `saythis'
, rather than printing the string 'words'
. What am I missing here? Replicating this code in irb prints the string 'words'
.