Class: OctetArray
- Inherits:
-
BinData::Primitive
- Object
- BinData::Primitive
- OctetArray
- Defined in:
- lib/logstash/codecs/netflow/util.rb
Instance Method Summary collapse
Instance Method Details
#get ⇒ Object
334 335 336 |
# File 'lib/logstash/codecs/netflow/util.rb', line 334 def get self.bytes.collect { |byte| byte.value.to_s(16).rjust(2,'0') }.join end |
#set(val) ⇒ Object
328 329 330 331 332 |
# File 'lib/logstash/codecs/netflow/util.rb', line 328 def set(val) unless val.nil? self.bytes = val.scan(/../).collect { |hex| hex.to_i(16)} end end |