Last active
November 3, 2016 20:13
-
-
Save boxofrad/3b96d34f17d4350b8cae3bf7aedda07d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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