Class: Middleman::PreviewServer::AllIpv6Interfaces

Inherits:
AllInterfaces show all
Defined in:
middleman-core/lib/middleman-core/preview_server/information.rb

Overview

This is used if bind address is ::, the server name needs to be blank

Instance Attribute Summary

Attributes inherited from BasicInformation

#bind_address, #listeners, #port, #reason, #server_name, #site_addresses, #valid

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AllInterfaces

#initialize, #resolve_me

Methods inherited from BasicInformation

#initialize, #resolve_me, #show_me_network_interfaces, #valid?, #validate_me

Constructor Details

This class inherits a constructor from Middleman::PreviewServer::AllInterfaces

Class Method Details

.matches?(options_hash = ::Middleman::EMPTY_HASH) ⇒ Boolean

Returns:

  • (Boolean)

168
169
170
# File 'middleman-core/lib/middleman-core/preview_server/information.rb', line 168

def self.matches?(options_hash = ::Middleman::EMPTY_HASH)
  options_hash[:bind_address] == '::' && options_hash[:server_name].blank?
end

Instance Method Details

#local_network_interfacesObject

Use only ipv6 interfaces


173
174
175
# File 'middleman-core/lib/middleman-core/preview_server/information.rb', line 173

def local_network_interfaces
  network_interfaces_inventory.nil? ? [] : network_interfaces_inventory.network_interfaces(:ipv6)
end