# File lib/text/format/roman.rb, line 37
37:   def [](index)
38:     roman = ""
39:     index += @offset
40: 
41:       # Do 1,000s
42:     roman << "M" * (index / 1000)
43:     index %= 1000
44: 
45:       # Do 900s
46:     roman << "CM" * (index / 900)
47:     index %= 900
48: 
49:       # Do 500s
50:     roman << "D" * (index / 500)
51:     index %= 500
52: 
53:       # Do 400s
54:     roman << "CD" * (index / 400)
55:     index %= 400
56: 
57:       # Do 100s
58:     roman << "C" * (index / 100)
59:     index %= 100
60: 
61:       # Do 90s
62:     roman << "XC" * (index / 90)
63:     index %= 90
64: 
65:       # Do 50s
66:     roman << "L" * (index / 50)
67:     index %= 50
68: 
69:       # Do 40s
70:     roman << "XL" * (index / 40)
71:     index %= 40
72: 
73:       # Do 10s
74:     roman << "X" * (index / 10)
75:     index %= 10
76: 
77:       # Do 9s
78:     roman << "IX" * (index / 9)
79:     index %= 9
80: 
81:       # Do 5s
82:     roman << "V" * (index / 5)
83:     index %= 5
84: 
85:       # Do 4s
86:     roman << "IV" * (index / 4)
87:     index %= 4
88: 
89:       # Do 1s
90:     roman << "I" * index
91: 
92:     roman.downcase! if @lower
93: 
94:     "#{@prefix}#{roman}#{@postfix}"
95:   end