Skip to content

Instantly share code, notes, and snippets.

@boxofrad
Last active November 3, 2016 20:13
Show Gist options
  • Save boxofrad/3b96d34f17d4350b8cae3bf7aedda07d to your computer and use it in GitHub Desktop.
Save boxofrad/3b96d34f17d4350b8cae3bf7aedda07d to your computer and use it in GitHub Desktop.
class IPPacket
attr_reader :bytes
def initialize(bytes)
@bytes = bytes
end
def version
bytes[0] >> 4
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment