1 2 3 4 5 6 7 8 9 10 11 12 |
if a.class.name == 'Array'
b = self.clone
b[0] = (b.length > 0) ? " and " : a[0]
b << a[1..-1] if a.length > 1
b.flatten
else
super(a)
end
end
end
|
Pastie
Support Pastie
or read my
Pastie << self
blog
1 2 3 4 5 6 7 8 9 10 11 12 |
if a.class.name == 'Array'
b = self.clone
b[0] = (b.length > 0) ? " and " : a[0]
b << a[1..-1] if a.length > 1
b.flatten
else
super(a)
end
end
end
|