Class: NetConfGen::Packet::Base

Inherits:
Struct
  • Object
show all
Defined in:
lib/netconfgen/netconfgen.rb

Overview

Base is a thin layer over a Struct.

Instance Method Summary collapse

Instance Method Details

#encodeObject

Encode the packet back to binary string. It uses the #to_str method to properly format each packet, and then forces 8bit encoding.



183
# File 'lib/netconfgen/netconfgen.rb', line 183

def encode; to_str.force_encoding('ascii-8bit'); end