lib/representable/pipeline.rb in representable-3.0.4 vs lib/representable/pipeline.rb in representable-3.1.0
- old
+ new
@@ -2,14 +2,15 @@
# Allows to implement a pipeline of filters where a value gets passed in and the result gets
# passed to the next callable object.
class Pipeline < Array
Stop = Class.new
- # options is mutuable.
+ # options is mutable.
def call(input, options)
inject(input) do |memo, block|
res = evaluate(block, memo, options)
- return(Stop)if Stop == res
+ return(Stop) if Stop == res
+
res
end
end
private