Class: OctetArray

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

Instance Method Summary collapse

Instance Method Details

#getObject



210
211
212
# File 'lib/logstash/codecs/netflow/util.rb', line 210

def get
  self.bytes.collect { |byte| byte.value.to_s(16).rjust(2,'0') }.join
end

#set(val) ⇒ Object



206
207
208
# File 'lib/logstash/codecs/netflow/util.rb', line 206

def set(val)
  self.bytes = val.scan(/../).collect { |hex| hex.to_i(16)}
end