Class: Fluent::Plugin::NetflowParser::MacAddr
- Inherits:
-
BinData::Primitive
- Object
- BinData::Primitive
- Fluent::Plugin::NetflowParser::MacAddr
- Defined in:
- lib/fluent/plugin/netflow_records.rb
Instance Method Summary collapse
Instance Method Details
#get ⇒ Object
50 51 52 |
# File 'lib/fluent/plugin/netflow_records.rb', line 50 def get self.bytes.collect { |byte| byte.value.to_s(16).rjust(2,'0') }.join(":") end |
#set(val) ⇒ Object
45 46 47 48 |
# File 'lib/fluent/plugin/netflow_records.rb', line 45 def set(val) ints = val.split(/:/).collect { |int| int.to_i(16) } self.bytes = ints end |