In this lesson, I am learning optional block.
class Library
attr_accessor :games
def initialize(games)
@games = games
end
def list
games.each do |game|
if block_given?
puts yield game
else
puts game.name
end
end
end
When I summit code, it shows syntax error, unexpected end_of_file.
I canât solve this problem, please help!!!
nzheng
2
If you had used proper intendation you had seen that an end is missing.
Am 25.06.2014 11:17 schrieb âNaomi Zhengâ [email protected]:
nzheng
3
Hi Naomi
You have missed one âendâ. Put âendâ at the end of the file.
nzheng
4
Monika M wrote in post #1150695:
Hi Naomi
You have missed one âendâ. Put âendâ at the end of the file.
Thank you so much.
nzheng
5
Norbert M. wrote in post #1150694:
If you had used proper intendation you had seen that an end is missing.
Am 25.06.2014 11:17 schrieb âNaomi Zhengâ [email protected]:
Thank you.