Class: Middleman::PreviewServer::BindAddressAndServerNameInformation
- Inherits:
-
BasicInformation
- Object
- BasicInformation
- Middleman::PreviewServer::BindAddressAndServerNameInformation
- Defined in:
- lib/middleman-core/preview_server/information.rb
Overview
Only used if bind address and server name are given and bind address is not :: or 0.0.0.0
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
-
#initialize(*args) ⇒ BindAddressAndServerNameInformation
constructor
A new instance of BindAddressAndServerNameInformation.
- #resolve_me ⇒ Object
Methods inherited from BasicInformation
#local_network_interfaces, #show_me_network_interfaces, #valid?, #validate_me
Constructor Details
#initialize(*args) ⇒ BindAddressAndServerNameInformation
Returns a new instance of BindAddressAndServerNameInformation.
233 234 235 236 237 238 239 240 241 |
# File 'lib/middleman-core/preview_server/information.rb', line 233 def initialize(*args) super @listeners << bind_address @site_addresses << server_name @site_addresses << bind_address @checks << Checks::ServerNameResolvesToBindAddress.new end |
Class Method Details
.matches?(opts = {}) ⇒ Boolean
243 244 245 |
# File 'lib/middleman-core/preview_server/information.rb', line 243 def self.matches?(opts={}) !opts[:bind_address].blank? && !opts[:server_name].blank? && !%w(:: 0.0.0.0).include?(opts[:bind_address]) end |
Instance Method Details
#resolve_me ⇒ Object
247 |
# File 'lib/middleman-core/preview_server/information.rb', line 247 def resolve_me(*); end |