lib/validation/adjustment.rb
def INJECT(adjuster1, adjuster2, *adjusters)
      adjusters = [adjuster1, adjuster2, *adjusters]

      unless adjusters.all?{|f|adjustable? f}
        raise TypeError, 'wrong object for adjuster'
      end

      ->v{
        adjusters.reduce(v){|ret, adjuster|adjuster.call ret}
      }
    end
def INJECT(adjuster1, adjuster2, *adjusters)
      adjusters = [adjuster1, adjuster2, *adjusters]

      unless adjusters.all?{|f|adjustable? f}
        raise TypeError, 'wrong object for adjuster'
      end

      ->v{
        adjusters.reduce(v){|ret, adjuster|adjuster.call ret}
      }
    end
def INJECT ( adjuster1 , adjuster2 , * adjusters ) adjusters = [ adjuster1 , adjuster2 , adjusters ] unless adjusters . all? { | f | adjustable? f } raise TypeError , 'wrong object for adjuster' end -> v { adjusters . reduce ( v ) { | ret , adjuster | adjuster . call ret } } end
Sequencial apply all adjusters.
 @param adjuster1 [Proc, #to_proc]
 @param adjuster2 [Proc, #to_proc]
 @param adjusters [Proc, #to_proc]
 @return [lambda]
Sequencial apply all adjusters .