class Rethtool::InterfaceSettings::Mode
A struct to represent interface modes (supported, advertised, current)
available fields are:
.speed -- integer link speed, in Mb (-1 if unknown) .duplex -- :full, :half, :fec, or :unknown .media -- A string, such as 'T', 'X', 'KX', etc, or nil if unknown
Public Instance Methods
to_s()
click to toggle source
Print out a more standard-looking representation for a mode
# File lib/rethtool/interface_settings.rb, line 27 def to_s if self.speed == :unknown "Unknown" else "#{self.speed}base#{self.media}/#{self.duplex}" end end