Skip to content

Instantly share code, notes, and snippets.

@dgmcguire
Created January 30, 2017 20:09
Show Gist options
  • Save dgmcguire/5df7e3dd1d9fb1b65b083930c3e0bd83 to your computer and use it in GitHub Desktop.
Save dgmcguire/5df7e3dd1d9fb1b65b083930c3e0bd83 to your computer and use it in GitHub Desktop.
private def valid_tx_type?(tx_type)
allowed_types = %w(query commit)
if allowed_types.map(&:to_sym).include?(tx_type)
return true
else
raise ArgumentError, "tx_type must be one of the following: :#{allowed_types.join(' :')}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment