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.
244 245 246 247 |
# File 'lib/conjure/service/docker_host.rb', line 244 def initialize() self.id = [:id] self.host = [:host] end |
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host.
242 243 244 |
# File 'lib/conjure/service/docker_host.rb', line 242 def host @host end |
#id ⇒ Object
Returns the value of attribute id.
242 243 244 |
# File 'lib/conjure/service/docker_host.rb', line 242 def id @id end |
Instance Method Details
#ip_address ⇒ Object
249 250 251 |
# File 'lib/conjure/service/docker_host.rb', line 249 def ip_address status["NetworkSettings"]["IPAddress"] end |
#status ⇒ Object
253 254 255 256 |
# File 'lib/conjure/service/docker_host.rb', line 253 def status require "json" JSON.parse(host.command "inspect #{id}").first end |