class Spark::Command::MapValues
Public Instance Methods
lazy_run(iterator, *)
click to toggle source
# File lib/spark/command/pair.rb, line 99 def lazy_run(iterator, *) iterator.map do |item| item[1] = @map_function.call(item[1]) item end end
run(iterator, *)
click to toggle source
# File lib/spark/command/pair.rb, line 91 def run(iterator, *) iterator.map! do |item| item[1] = @map_function.call(item[1]) item end iterator end