Sha256: f24afd94fb3a1247a86192eae4e89ccba4b7d9d4f450a0310a6dbe8df593433c

Contents?: true

Size: 373 Bytes

Versions: 1

Compression:

Stored size: 373 Bytes

Contents

class FinishDeselector
  attr_reader :finish
  attr_reader :project

  def initialize(finish:)
    @finish  = finish
    @project = finish.project
  end

  def deselect!
    ActiveRecord::Base.transaction do
      finish.deselect!
      project.set_selected_total_amount!
      true
    end
  end

  def self.deselect!(finish:)
    new(finish: finish).deselect!
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
self_systeem-0.1.0 test/dummy_app/app/services/finish_deselector.rb