-
-
Save apeiros/ac150d8a32b5a6f6f7fa952dbecfb31a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AllowedTypes = %i[query commit].to_set | |
private def assert_valid_tx_type(tx_type) | |
unless valid_tx_type?(tx_type) | |
raise ArgumentError, "tx_type must be one of the following: #{AllowedTypes.inspect[1..-2]}" | |
end | |
end | |
private def valid_tx_type?(tx_type) | |
AllowedTypes.include?(tx_type) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment