X-Received: by 2002:ad4:50c7:: with SMTP id e7mr63410896qvq.53.1637222107590; Wed, 17 Nov 2021 23:55:07 -0800 (PST) X-Received: by 2002:a25:b181:: with SMTP id h1mr23594599ybj.76.1637222107471; Wed, 17 Nov 2021 23:55:07 -0800 (PST) Path: ...!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: fr.comp.lang.ruby Date: Wed, 17 Nov 2021 23:55:07 -0800 (PST) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=147.250.2.201; posting-account=vrA3_AoAAABSTowlfoxCghbkuaJOxXlW NNTP-Posting-Host: 147.250.2.201 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6393330d-2ef9-439a-b0d0-c39997cf828bn@googlegroups.com> Subject: =?UTF-8?Q?Re=3A_Probl=C3=A8me_de_syntaxe_ruby?= From: Maurice Diamantini Injection-Date: Thu, 18 Nov 2021 07:55:07 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Bytes: 2086 Lines: 29 Ou alors la question non indent=C3=A9e n'=C3=A9tait qu'un test pour savoir = si quelqu'un suivait ce groupe ;-) ? -- Maurice (ancien promoteur de tcl, puis de ruby, puis de Julia ;-) Le jeudi 18 novembre 2021 =C3=A0 08:51:51 UTC+1, Maurice Diamantini a =C3= =A9crit=C2=A0: > Bonjour,=20 >=20 > Il ne manquerait pas une `end` pour la class ?=20 > -- Maurice > Le mardi 16 novembre 2021 =C3=A0 23:08:38 UTC+1, LaLibreParole a =C3=A9cr= it :=20 > > Je n'arrive pas =C3=A0 voir ce qui ne va pas dans ce code:=20 > >=20 > > class Personne=20 > > attr_accessor :nom, :points_de_vie, :en_vie=20 > > def initialize(nom)=20 > > @nom =3D nom=20 > > @points_de_vie =3D 100=20 > > @en_vie =3D true=20 > > end=20 > > def info=20 > > if @points_de_vie > 0=20 > > return @nom + @points_de_vie=20 > > else=20 > > return @nom + "vaincu"=20 > > end=20 > >=20 > > Une id=C3=A9e ?