Class: Fluent::Plugin::NetflowipfixInput::OctetArray2

Inherits:
BinData::Primitive
  • Object
show all
Defined in:
lib/fluent/plugin/netflowipfix_records.rb

Instance Method Summary collapse

Instance Method Details

#getObject



236
237
238
# File 'lib/fluent/plugin/netflowipfix_records.rb', line 236

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

#set(val) ⇒ Object



231
232
233
234
# File 'lib/fluent/plugin/netflowipfix_records.rb', line 231

def set(val)
  ints = val.split(/:/).collect { |int| int.to_i(16) }
  self.bytes = ints
end