2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/matisse/colorizers/float.rb', line 2
def inspect_colorized
if inspect =~ /^(\d+)(\.)(\d+)$/
res = $1.colorize(:float ) res += $2.colorize(:float_separator ) res += $3.colorize(:float ) return res
end
if inspect =~ /^(\d)(\.)(\d+)(e)([+-])(\d+)$/
res = $1.colorize(:float ) res += $2.colorize(:float_separator ) res += $3.colorize(:float ) res += $4.colorize(:float_exp ) res += $5.colorize(:float_plusminus ) res += $6.colorize(:float ) return res
end
inspect
end
|