class Middleman::PreviewServer::NetworkInterfaceInventory
This holds information about local network interfaces on the user systemd
Attributes
Public Class Methods
Source
# File lib/middleman-core/preview_server/network_interface_inventory.rb, line 49 def initialize @types = [] @types << Ipv4 @types << Ipv6 @types << All end
Public Instance Methods
Source
# File lib/middleman-core/preview_server/network_interface_inventory.rb, line 60 def network_interfaces(type=:all) types.find { |t| t.match? type.to_sym }.new.network_interfaces end
Return ip interfaces
@param [Symbol] type
The type of interface which should be returned