Newsgroups: comp.lang.ruby
From: "Timothy Byrd" <byrd.timo...@gmail.com>
Date: 6 Mar 2005 10:43:09 -0800
Local: Sun, Mar 6 2005 1:43 pm
Subject: Re: Roman Numerals (#22)
Since I'm new to Ruby, I may be more enthusiastic than skillful, but
here is my solution. ########## class RomanNumerals Roman_array = [ def self.to_roman(val) def self.from_roman(str) while s =~ /^(M|CM|D|CD|C|XC|L|XL|X|IX|V|IV|I)/ if !s.empty? value def self.translate(s) $<.each_line { |line| puts RomanNumerals.translate(line.chomp) } ########## -- Timothy You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||