Sha256: b909dc72ac08669f3e8b7f663011b95cbe56e77f2bd2f3ac8f384c799a9aa4a3

Contents?: true

Size: 622 Bytes

Versions: 5

Compression:

Stored size: 622 Bytes

Contents

require "cousin_roman/version"
require "cousin_roman/roman"
require "cousin_roman/arabian"
require "cousin_roman/string_extension"
require "cousin_roman/integer_extension"

module CousinRoman
  LITERALS = [
    'i', 'I',
    'v', 'V',
    'x', 'X',
    'l', 'L',
    'c', 'C',
    'd', 'D',
    'm', 'M'
  ]

  ONES = {
    'i' => 1,
    'x' => 10,
    'c' => 100,
    'm' => 1000
  }

  FIVES = {
    'v' => 5,
    'l' => 50,
    'd' => 500,
  }

  SUBTRACTIVES = {
    'iv' => 4,
    'ix' => 9,
    'xl' => 40,
    'xc' => 90,
    'cd' => 400,
    'cm' => 900,
  }

  FACTORS = ONES.merge(FIVES).merge(SUBTRACTIVES)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cousin_roman-1.0.4 lib/cousin_roman.rb
cousin_roman-1.0.3 lib/cousin_roman.rb
cousin_roman-1.0.2 lib/cousin_roman.rb
cousin_roman-1.0.1 lib/cousin_roman.rb
cousin_roman-1.0.0 lib/cousin_roman.rb