Class: Conjure::Service::Container
- Inherits:
-
Object
- Object
- Conjure::Service::Container
- Defined in:
- lib/conjure/service/docker_host.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(options) ⇒ Container
constructor
A new instance of Container.
- #ip_address ⇒ Object
- #status ⇒ Object
Constructor Details
#initialize(options) ⇒ Container
Returns a new instance of Container.
238 239 240 241 |
# File 'lib/conjure/service/docker_host.rb', line 238 def initialize() self.id = [:id] self.host = [:host] end |
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host.
236 237 238 |
# File 'lib/conjure/service/docker_host.rb', line 236 def host @host end |
#id ⇒ Object
Returns the value of attribute id.
236 237 238 |
# File 'lib/conjure/service/docker_host.rb', line 236 def id @id end |
Instance Method Details
#ip_address ⇒ Object
243 244 245 |
# File 'lib/conjure/service/docker_host.rb', line 243 def ip_address status["NetworkSettings"]["IPAddress"] end |
#status ⇒ Object
247 248 249 250 |
# File 'lib/conjure/service/docker_host.rb', line 247 def status require "json" JSON.parse(host.command "inspect #{id}").first end |