Sha256: b0b381b748841221facfbd3e644c5ab8ec63063f79dcb47ade1cb83396154843

Contents?: true

Size: 518 Bytes

Versions: 10

Compression:

Stored size: 518 Bytes

Contents

class MasterLoaderDSL
  fattr(:master) { MasterLoader.instance }
  def initialize(&b)
    @blk = b
    instance_eval(&b)
  end
  def database(ops)
    master.db_ops = ops
  end
  def load_order(*tables)
    master.raw_table_load_order = tables.flatten
  end
  def delete_order(*tables)
    master.raw_table_delete_order = tables.flatten
  end
  def block_size(n)
    master.block_size = n
  end
  def run!
    master.run!
  end
end

def master_dataload(&b)
  handle_errors do
    MasterLoaderDSL.new(&b).run!
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
GFunk911-dataload-0.8.0 lib/dataload/dsl/master_loader_dsl.rb
GFunk911-dataload-0.8.1 lib/dataload/dsl/master_loader_dsl.rb
GFunk911-dataload-0.8.2 lib/dataload/dsl/master_loader_dsl.rb
GFunk911-dataload-0.8.3 lib/dataload/dsl/master_loader_dsl.rb
GFunk911-dataload-0.8.4 lib/dataload/dsl/master_loader_dsl.rb
GFunk911-dataload-0.8.5 lib/dataload/dsl/master_loader_dsl.rb
GFunk911-dataload-0.9.0 lib/dataload/dsl/master_loader_dsl.rb
GFunk911-dataload-0.9.1 lib/dataload/dsl/master_loader_dsl.rb
GFunk911-dataload-0.9.2 lib/dataload/dsl/master_loader_dsl.rb
GFunk911-dataload-0.9.4 lib/dataload/dsl/master_loader_dsl.rb