module NETSNMP::ASNExtensions
Constants
- ASN_COLORS
Public Instance Methods
colorize_hex(der = to_der)
click to toggle source
# File lib/netsnmp/extensions.rb, line 88 def colorize_hex(der = to_der) hex = Hexdump.dump(der, separator: " ") lbl = @label || self.class.name.split("::").last "#{lbl}: \e[#{ASN_COLORS[self.class]}m#{hex}\e[0m" end
to_hex()
click to toggle source
# File lib/netsnmp/extensions.rb, line 43 def to_hex "#{colorize_hex} (#{value.to_s.inspect})" end
with_label(label)
click to toggle source
# File lib/netsnmp/extensions.rb, line 64 def with_label(label) @label = label self end