Ruby 16. Object-Oriented Programming 12/20


#1


https://www.codecademy.com/fr/courses/ruby-beginner-fr-FR-ijkr8/2/2?curriculum_id=535e93005d81962043000001#


Hi.
My code doesn't passbut it seems correct.

Is it a bug ?

Thank you.

Ajoutez votre code ci-dessous

class Application
def initialize(nom)
@nom = nom
end
end

Oups, merci de réessayer. Avez-vous créé une classe appelée MonAppli ?


Replace this line with your code.


16. Object-Oriented Programming 12/20](https://discuss.codecademy.com/t/ruby-16-object-oriented-programming-12-20
#2

@snakefinger33gmail.c

class Application
  def initialize(nom)
    @nom = nom
  end
end

class MonAppli < Application
  #Quelque chose !
end

#3

Thank you very much.


#4

I just wondering if you have any materials (writings, links) for object and class, (class instances, class variables) for Ruby. If it is a too much of a problem then just don't bother it's fine.


#5

Hi,
I've done this exercise but now my problem seems to be a bug on the exercise 19/20.


#6

Hi, what sort of bug ; can you explain a bit more detail?


#7

Look at this ;

class Message
@@messages_envoyes = 0
def initialize(de, a)
@de = de
@a = a
@@messages_envoyes += 1
end
end
class Email < Message
def initialize(sujet)
@sujet = sujet
end
end
mon_message = Message.new("Moi","Toi")

Oups, merci de réessayer. La méthode initialize de Email a-t-elle un unique paramètre : 'sujet' ?
I don't understand.
I have refreshed my page but it never works.


#8

This is the link :slight_smile:
https://www.codecademy.com/fr/courses/ruby-beginner-fr-FR-ijkr8/3/4?curriculum_id=535e93005d81962043000001#


#9

I do not see any problem, I used your code. I think you need to check with others as well.

How about try to just pass this section although your code seems fine.

mon_message = Email.new("De_rien")


#10

Ok.
Thanks a lot.
I hope it will be fine.


#11

@snakefinger33gmail.c

Please read
https://www.codecademy.com/forum_questions/538f36ef52f8639684006686
found with google search
Oups, merci de réessayer. La méthode initialize de Email a-t-elle un unique paramètre : 'sujet' site:codecademy.com


#12

Thank you for your response Leonard.