lib/eco/api/usecases/default_cases/refresh_case.rb in eco-helpers-1.5.1 vs lib/eco/api/usecases/default_cases/refresh_case.rb in eco-helpers-1.5.2

- old
+ new

@@ -1,23 +1,10 @@ -module Eco - module API - class UseCases - class DefaultCases - class Refresh < DefaultCase +class Eco::API::UseCases::DefaultCases::RefreshCase < Eco::API::Common::Loaders::UseCase + name "refresh" + type :transform - def process - @cases.define("refresh", type: :transform) do |people, session, options, usecase| - job = session.job_group("main").new("update", usecase: usecase, type: :update, sets: :account) - - people.each_with_index do |person, i| - job.add(person) - end - - end - end - - end - - end - end + def main(people, session, options, usecase) + update = session.new_job("main", "update", :update, usecase) + people.each {|person| job.add(person)} end + end