Class: ACLIdASA

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

Instance Method Summary collapse

Instance Method Details

#getObject



61
62
63
64
# File 'lib/logstash/codecs/netflow/util.rb', line 61

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



57
58
59
# File 'lib/logstash/codecs/netflow/util.rb', line 57

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