Class: ACLIdASA

Inherits:
BinData::Primitive
  • Object
show all
Defined in:
lib/logstash/codecs/netflow/util.rb

Instance Method Summary collapse

Instance Method Details

#getObject



91
92
93
94
# File 'lib/logstash/codecs/netflow/util.rb', line 91

def get
  hexstring = self.bytes.collect { |byte| byte.value.to_s(16).rjust(2,'0') }.join
  hexstring.scan(/......../).collect { |aclid| aclid }.join("-")
end

#set(val) ⇒ Object



87
88
89
# File 'lib/logstash/codecs/netflow/util.rb', line 87

def set(val)
  self.bytes = val.split("-").collect { |aclid| aclid.scan(/../).collect { |hex| hex.to_i(16)} }.flatten
end