class Middleman::PreviewServer::AllIpv4Interfaces

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

Public Class Methods

matches?(opts={}) click to toggle source
# File lib/middleman-core/preview_server/information.rb, line 149
def self.matches?(opts={})
  opts[:bind_address] == '0.0.0.0' && opts[:server_name].blank?
end

Public Instance Methods

local_network_interfaces() click to toggle source

Use only ipv4 interfaces

# File lib/middleman-core/preview_server/information.rb, line 154
def local_network_interfaces
  network_interfaces_inventory.nil? ? [] : network_interfaces_inventory.network_interfaces(:ipv4)
end

Private Instance Methods

after_init() click to toggle source
# File lib/middleman-core/preview_server/information.rb, line 160
def after_init
  @listeners << ServerIpAddress.new('0.0.0.0')
end