Up, Up, and Away! exercise 20/20


#1

Link to the page:
https://www.codecademy.com/en/courses/ruby-beginner-en-MFiQ6/3/5?curriculum_id=5059f8619189a5000201fbcb

This is my code:
class Message
@@messages_sent = 0
def initialize(from, to)
@from = from
@to = to
@@messages_sent += 1
end
end

my_message = Message.new("Toronto", "Calgary")
class Email < Message
def initialize(from, to)
super()
end
end

This is the error message I am getting:
Oops, try again. Did you change Email's initialize method to accept two parameters, 'from' and 'to'?

can someone help me out!

Thank you


#2

Take the () off of super.


#3

thanks you that was it! so silly!!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.