class Middleman::PreviewServer::NetworkInterfaceInventory
This holds information about local network interfaces on the user systemd
Attributes
types[R]
Public Class Methods
new()
click to toggle 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
network_interfaces(type=:all)
click to toggle source
Return ip interfaces
@param [Symbol] type
The type of interface which should be returned
# 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