module Roda::RodaPlugins::HostRouting::RequestMethods
Private Instance Methods
Source
# File lib/roda/plugins/host_routing.rb, line 178 def _get_host_routing_host host = self.host || "" roda_class.opts[:host_routing_hash][host] || scope._host_routing_default(host) || roda_class.opts[:host_routing_default_host] end
Determine the host to use for the host routing support. Tries the following, in order:
-
An exact match for a hostname given in
hosts.to
-
The return value of the
hosts.default
block, if given -
The default value provided in the
hosts.default
call
Source
# File lib/roda/plugins/host_routing.rb, line 168 def _host_routing_host @_host_routing_host ||= _get_host_routing_host end
Cache the host to use in the host routing support, so the processing is only done once per request.