I wrote the following code in a file 1_arithmetic.rb
:
def arithmetic1(n)
(n * 5) - 20
end
Using the gem tool rake
, I typed this into the console:
rake 1_arithmetic.rb:arithmetic1(5)
Then, I got an error message that reads:
syntax error near unexpected token `('
Does anyone know where I might have done wrong? Or is the problem the way I used rake
?