class Middleman::PreviewServer::BasicInformation
Basic information class to wrap common behaviour
def initialize(opts={})
-
port
(Integer
) -- -
server_name
(String
) -- -
bind_address
(String
) --
def initialize(opts={}) @bind_address = ServerIpAddress.new(opts[:bind_address]) @server_name = ServerHostname.new(opts[:server_name]) @port = opts[:port] @valid = true @site_addresses = [] @listeners = [] @checks = [] # This needs to be check for each use case. Otherwise `Webrick` will # complain about that. @checks << Checks::InterfaceIsAvailableOnSystem.new end
def local_network_interfaces
def local_network_interfaces network_interfaces_inventory.nil? ? [] : network_interfaces_inventory.network_interfaces(:all) end
def resolve_me(*)
def resolve_me(*) fail NoMethodError end
def show_me_network_interfaces(inventory)
-
inventory
(#network_interfaces
) --
def show_me_network_interfaces(inventory) @network_interfaces_inventory = inventory end
def valid?
def valid? valid == true end
def validate_me(validator)
-
validator
(#validate
) --
def validate_me(validator) validator.validate self, checks end