Class: Middleman::PreviewServer::BindAddressAndServerNameInformation
- Inherits:
-
BasicInformation
- Object
- BasicInformation
- Middleman::PreviewServer::BindAddressAndServerNameInformation
- Defined in:
- middleman-core/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.
234 235 236 237 238 239 240 241 242 |
# File 'middleman-core/lib/middleman-core/preview_server/information.rb', line 234 def initialize(*args) super @listeners << bind_address @site_addresses << server_name @site_addresses << bind_address @checks << Checks::ServerNameResolvesToBindAddress.new end |
Class Method Details
.matches?(options_hash = ::Middleman::EMPTY_HASH) ⇒ Boolean
244 245 246 |
# File 'middleman-core/lib/middleman-core/preview_server/information.rb', line 244 def self.matches?( = ::Middleman::EMPTY_HASH) ![:bind_address].blank? && ![:server_name].blank? && !%w[:: 0.0.0.0].include?([:bind_address]) end |
Instance Method Details
#resolve_me ⇒ Object
248 |
# File 'middleman-core/lib/middleman-core/preview_server/information.rb', line 248 def resolve_me(*); end |