Class: RuuubyService
- Defined in:
- lib/ruuuby/ruuuby/api/docker/docker_service.rb
Overview
——————————————– ⚠️ ——————————————–
Instance Attribute Summary collapse
-
#alias ⇒ Object
readonly
Returns the value of attribute alias.
-
#configs ⇒ Object
readonly
Returns the value of attribute configs.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #container ⇒ Object
- #env ⇒ String
- #healthy? ⇒ Boolean
-
#initialize(service_name, configs) ⇒ RuuubyService
constructor
A new instance of RuuubyService.
Constructor Details
#initialize(service_name, configs) ⇒ RuuubyService
Returns a new instance of RuuubyService.
9 10 11 12 13 14 |
# File 'lib/ruuuby/ruuuby/api/docker/docker_service.rb', line 9 def initialize(service_name, configs) @name = service_name @alias = service_name.♻️⟶('service_') @configs = configs @container = nil end |
Instance Attribute Details
#alias ⇒ Object (readonly)
Returns the value of attribute alias.
7 8 9 |
# File 'lib/ruuuby/ruuuby/api/docker/docker_service.rb', line 7 def alias @alias end |
#configs ⇒ Object (readonly)
Returns the value of attribute configs.
7 8 9 |
# File 'lib/ruuuby/ruuuby/api/docker/docker_service.rb', line 7 def configs @configs end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/ruuuby/ruuuby/api/docker/docker_service.rb', line 7 def name @name end |
Instance Method Details
#container ⇒ Object
19 20 21 22 23 24 |
# File 'lib/ruuuby/ruuuby/api/docker/docker_service.rb', line 19 def container if @container == nil @container = 🐋.find_🐋(@name) end @container end |
#env ⇒ String
17 |
# File 'lib/ruuuby/ruuuby/api/docker/docker_service.rb', line 17 def env; self.container.env; end |
#healthy? ⇒ Boolean
27 28 29 |
# File 'lib/ruuuby/ruuuby/api/docker/docker_service.rb', line 27 def healthy? self.container.healthy? && healthy_os? end |