class Dort::Container::Ports
Attributes
binds[R]
Public Class Methods
new(port_bindings)
click to toggle source
# File lib/dort.rb, line 10 def initialize(port_bindings) @binds = Hash.new{|h,k|h[k] = []} port_bindings.each do |container_port, info| info.each do |host| @binds[container_port] << host['HostPort'] end end end
Public Instance Methods
host()
click to toggle source
# File lib/dort.rb, line 25 def host binds.values end
to_s()
click to toggle source
# File lib/dort.rb, line 19 def to_s binds.map do |k,v| "#{v.join(",")}=>#{k}" end.join(", ") end