18F/micropurchase

View on GitHub
app/models/eligibility_factory.rb

Summary

Maintainability
A
0 mins
Test Coverage
class EligibilityFactory
  attr_reader :start_price_threshold

  def initialize(auction)
    @start_price_threshold = AuctionThreshold.new(auction)
  end

  def create
    if start_price_threshold.small_business?
      Eligibilities::SmallBusiness.new
    else
      Eligibilities::InSam.new
    end
  end
end