I am doing codeschool Ruby Bits Part2, but get stucked

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. :frowning:
I can’t solve this problem, please help!!!

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]:

Hi Naomi

You have missed one ‘end’. Put ‘end’ at the end of the file.

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. :slight_smile:

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. :slight_smile: