class Middleman::PreviewServer::Checks::RequiresBindAddressIfServerNameIsGiven

This one requires a bind address if the user entered a server name

If the `bind_address` is blank this check will fail

Public Instance Methods

validate(information) click to toggle source
# File lib/middleman-core/preview_server/checks.rb, line 60
def validate(information)
  return unless information.bind_address.blank?

  information.valid = false
  information.reason = format('Server name "%s" does not resolve to an ip address', information.server_name)
end