lib/ruote/storage/base.rb
# Copies the content of this storage into a target storage.
#
# Of course, the target storage may be a different implementation.
#
Copies the content of this storage into a target storage.
Of course, the target storage may be a different implementation.
Copies the content of this storage into a target storage . Of course the target storage may be a different implementation .
def copy_to(target, opts={})
      counter = 0
      %w[
        configurations errors expressions msgs schedules variables workitems
      ].each do |type|
        ids(type).each do |id|
          item = get(type, id)
          item.delete('_rev')
          target.put(item)
          counter += 1
          puts("  #{type}/#{item['_id']}") if opts[:verbose]
        end
      end
      counter
    end
def copy_to ( target , opts = { } ) counter = 0 %w[ configurations errors expressions msgs schedules variables workitems ] . each do | type | ids ( type ) . each do | id | item = get ( type , id ) item . delete ( '_rev' ) target . put ( item ) counter += 1 puts ( "  #{type}/#{item['_id']}" ) if opts [ :verbose ] end end counter end
Copies the content of this storage into a target storage.
Copies the content of this storage into a target storage .
target
opts