brew/Library/Homebrew/pour_bottle_check.rb
Mike McQuaid 2b737f0423
Split up SoftwareSpec
This came up in the AGM and has bothered me for years: let's actually
split out `software_spec.rb` into one file per class, as is more typical
in Ruby.

This will make these classes easier to find.
2025-02-04 16:27:39 +00:00

19 lines
368 B
Ruby

# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
class PourBottleCheck
include OnSystem::MacOSAndLinux
def initialize(formula)
@formula = formula
end
def reason(reason)
@formula.pour_bottle_check_unsatisfied_reason = reason
end
def satisfy(&block)
@formula.send(:define_method, :pour_bottle?, &block)
end
end