Class: Integer

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_roman(roman) ⇒ Object



249
250
251
# File 'lib/roman.rb', line 249

def self.from_roman(roman)
  RomanNumeral.to_integer(roman)
end

Instance Method Details

#to_romanObject

Converts this integer to a roman numeral.



254
255
256
# File 'lib/roman.rb', line 254

def to_roman
  RomanNumeral.new(self)
end