lib/mappers/pass_through_mapper.rb in mandy-0.2.15 vs lib/mappers/pass_through_mapper.rb in mandy-0.3.1
- old
+ new
@@ -1,10 +1,10 @@
module Mandy
module Mappers
class PassThroughMapper < Base
- def mapper(key,value)
+ def mapper(*params)
# default map is simply a pass-through
- emit(key, value)
+ params.size == 1 ? emit(params[0]) : emit(params[0], params[1])
end
end
end
end
\ No newline at end of file