-
-
Save xorrbit/be04d574e2dba90ed240 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
# this turns an ugly statement like this: | |
# payee_id = message.value[0].value[2].value[0].value[0].value[0].value[2].value | |
# into a somewhat less ugly statement: | |
# payee_id = asn1_data_lookup(message.value, [0,2,0,0,0,2,0]) | |
def asn1_data_lookup(message, indices) | |
indices.each do |index| | |
message = message[index].value | |
end | |
message | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment