class Middleman::PreviewServer::ServerInformationCallbackProxy

This class wraps server information to be used in call back

All information is “dupped” and the callback is not meant to be used to modify these information.

Attributes

listeners[R]
port[R]
server_name[R]
site_addresses[R]

Public Class Methods

new(server_information) click to toggle source
# File lib/middleman-core/preview_server/server_information_callback_proxy.rb, line 15
def initialize(server_information)
  @listeners = ServerUrl.new(
    hosts: server_information.listeners,
    port: server_information.port,
    https: server_information.https?,
    format_output: false
  ).to_bind_addresses

  @port           = server_information.port
  @server_name    = server_information.server_name.dup unless server_information.server_name.nil?

  @site_addresses = ServerUrl.new(
    hosts: server_information.site_addresses,
    port: server_information.port,
    https: server_information.https?,
    format_output: false
  ).to_urls
end