Method: Docker::Compose::Mapper#map
- Defined in:
- lib/docker/compose/mapper.rb
permalink #map(value) ⇒ String, Array
Substitute service hostnames and ports that appear in a URL or a host:port string. If either component of a host:port string is surrounded by square brackets, “elide” that component, removing it from the result but using it to find the correct service and port.
88 89 90 91 92 93 94 |
# File 'lib/docker/compose/mapper.rb', line 88 def map(value) if value.respond_to?(:map) value.map { |e| map_scalar(e) } else map_scalar(value) end end |