lib/remi/transform.rb in remi-0.2.11 vs lib/remi/transform.rb in remi-0.2.12
- old
+ new
@@ -48,12 +48,12 @@
mmissing
end
end
end
- def nvl
- memoize_as_lambda(__method__) do |*largs|
- Array(largs).find('') { |arg| !arg.blank? }
+ def nvl(default='')
+ memoize_as_lambda(__method__, default) do |(mdefault), *largs|
+ Array(largs).find(->() { mdefault }) { |arg| !arg.blank? }
end
end
def ifblank(replace_with)
memoize_as_lambda(__method__, replace_with) do |(mreplace_with), larg|