lib/jm/dsl/syncer.rb
def pull(source, target, options = {}, context = {})
        init = [source, Failure.new]
        obj, failure = @syncers.reduce(init) do |(s, f), syncer|
          res = syncer.pull(s, target, options, context)

          case res
          when Success then [res.value, f]
          when Failure then [s, f + res]
          end
        end

        if failure.errors.length > 0
          failure
        else
          Success.new(obj)
        end
      end
# Pull the `target` through all registered syncers into `source`
Pull the `target` through all registered syncers into `source`
Pull the ` target ` through all registered syncers into ` source `
def pull(source, target, options = {}, context = {})
        init = [source, Failure.new]
        obj, failure = @syncers.reduce(init) do |(s, f), syncer|
          res = syncer.pull(s, target, options, context)
          case res
          when Success then [res.value, f]
          when Failure then [s, f + res]
          end
        end
        if failure.errors.length > 0
          failure
        else
          Success.new(obj)
        end
      end
def pull ( source , target , options = { } , context = { } ) init = [ source , Failure . new ] obj , failure = @syncers . reduce ( init ) do | ( s , f ) , syncer | res = syncer . pull ( s , target , options , context ) case res when Success then [ res . value , f ] when Failure then [ s , f + res ] end end if failure . errors . length > 0 failure else Success . new ( obj ) end end
Pull the `target` through all registered syncers into `source`
Pull the ` target ` through all registered syncers into ` source `
source
target
options
context