Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: nubie question
Bertram Scharpf
7/29/2007 11:40:00 PM
Hi,
Am Montag, 30. Jul 2007, 07:04:57 +0900 schrieb Mac Pat:
> module HL7 # :nodoc:
> VERSION = "0.1.%s" % "$Rev: 23 $".gsub(/\$Rev:\s+/, '').gsub(/\s*\$$/, '')
> end
I think smarter would be one of
V = "0.1." + "$Rev: 23 $"[/\$Rev:\s*(\d+)\s*\$/, 1]
V = "0.1.%d" % "$Rev: 23 $"[/\d+/]
V = [0,1,"$Rev: 23 $"[/\d+/]].join "."
To get it readable to some slight extent one should split it
up into at least two lines.
tiny = "$Rev: 23 $"[/\d+/]
...
> # Encapsulate HL7 specific exceptions
> class HL7::Exception < StandardError
> end
module HL7 ; class Exception < ::StandardError ; end ; end
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: nubie question
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password