Forked from tpendragon/gist:75ec03ddf10542d8e463
Last active
August 29, 2015 14:05
-
-
Save semaj/0a0f6e4e6ef1e3e6f8ee 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
module DynamicNetworkGraph | |
class NetworkFlow | |
attr_accessor :srcAddr, :dstAddr, :srcPort, :dstPort, :protocol, :start, :end, :packets, :transferred, :status | |
def fromFields(sep, line) | |
line.split(sep).zip(instance_variables).each { |val, name| instance_variable_set(name, val) } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment