Module: Bj::Table::Job::ClassMethods
- Defined in:
- lib/bj/table.rb
Instance Method Summary collapse
Instance Method Details
#submit(jobs, options = {}, &block) ⇒ Object
128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/bj/table.rb', line 128 def submit jobs, = {}, &block jobs = Joblist.for jobs, returned = [] transaction do jobs.each do |job| job = create_hash_for(job.reverse_merge(submit_defaults)) job = create! job returned << (block ? block.call(job) : job) end end returned end |