Class: Fluent::Plugin::NetflowipfixInput::MacAddr

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

Instance Method Summary collapse

Instance Method Details

#getObject



55
56
57
# File 'lib/fluent/plugin/netflowipfix_records.rb', line 55

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

#set(val) ⇒ Object



50
51
52
53
# File 'lib/fluent/plugin/netflowipfix_records.rb', line 50

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