Mailinglist Archive: yast-devel (126 mails)

< Previous Next >
[yast-devel] WebYaST: use ||= Ruby operator
  • From: Ladislav Slezak <lslezak@xxxxxxx>
  • Date: Thu, 05 Nov 2009 15:44:29 +0100
  • Message-id: <4AF2E4CD.1040202@xxxxxxx>

Use

message ||= "Unknown error"

instead of

if message.nil?
message = "Unknown error"
end

It makes the code shorter and more readable.

--

Best Regards

Ladislav Slez√°k
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: lslezak@xxxxxxx
Lihovarsk√° 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages