Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/roman.rb

Instance Method Summary collapse

Instance Method Details

#is_roman_numeral?Boolean

Returns true if a valid roman numeral.

Returns:

  • (Boolean)


270
271
272
# File 'lib/roman.rb', line 270

def is_roman_numeral?
  RomanNumeral.is_roman_numeral?(self)
end

#to_romanObject

Considers string a roman numeral numeral, and converts it to the corresponding integer.



265
266
267
# File 'lib/roman.rb', line 265

def to_roman
  RomanNumeral.new(self)
end