Class: Docker2plantuml::DockerContainer

Inherits:
Object
  • Object
show all
Defined in:
lib/docker2plantuml/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, status) ⇒ DockerContainer

Returns a new instance of DockerContainer.



7
8
9
10
11
# File 'lib/docker2plantuml/model.rb', line 7

def initialize(name, status)
  @container_name = name
  @status = status
  @port_info_list = []
end

Instance Attribute Details

#container_nameObject

Returns the value of attribute container_name.



5
6
7
# File 'lib/docker2plantuml/model.rb', line 5

def container_name
  @container_name
end

#network_settingObject

Returns the value of attribute network_setting.



5
6
7
# File 'lib/docker2plantuml/model.rb', line 5

def network_setting
  @network_setting
end

#port_info_listObject

Returns the value of attribute port_info_list.



5
6
7
# File 'lib/docker2plantuml/model.rb', line 5

def port_info_list
  @port_info_list
end

#statusObject

Returns the value of attribute status.



5
6
7
# File 'lib/docker2plantuml/model.rb', line 5

def status
  @status
end

Instance Method Details

#server_port_listObject



13
14
15
16
17
# File 'lib/docker2plantuml/model.rb', line 13

def server_port_list
  @port_info_list
    .map(&:host_port)
    .select { |p| p.is_a? String }
end