class Representable::Pipeline

Allows to implement a pipeline of filters where a value gets passed in and the result gets passed to the next callable object.

Note: this is still experimental.

Public Instance Methods

call(context, value, *args) click to toggle source

include Representable::Cloneable

# File lib/representable/pipeline.rb, line 10
def call(context, value, *args)
  inject(value) { |memo, block| block.call(memo, *args) }
end