blob: f643ac17ab3e27590c69d06be71ff820dd0e3353 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
class Hash
def alias(&block)
inject({}) do |aliased, (key, value)|
aliased.merge(yield(key) => value)
end
end
def to_sql(builder = ValuesBuilder.new)
builder.call do
row *values
end
end
end
|