class Middleman::PreviewServer::NetworkInterfaceInventory::Ipv6

Return all ipv6 interfaces

Public Class Methods

match?(type) click to toggle source
# File lib/middleman-core/preview_server/network_interface_inventory.rb, line 38
def self.match?(type)
  :ipv6 == type
end

Public Instance Methods

network_interfaces() click to toggle source
# File lib/middleman-core/preview_server/network_interface_inventory.rb, line 34
def network_interfaces
  Socket.ip_address_list.select { |ai| ai.ipv6? && !ai.ipv6_loopback? }.map { |ai| ServerIpv6Address.new(ai.ip_address) }
end