Class: Docker::Repository
Direct Known Subclasses
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#image_id ⇒ Object
readonly
Returns the value of attribute image_id.
Instance Method Summary collapse
-
#initialize(id, name) ⇒ Repository
constructor
A new instance of Repository.
- #remove! ⇒ Object
- #remove_image! ⇒ Object
- #to_s ⇒ Object
Methods inherited from Image
build, #inspekt, #repositories
Methods included from Helpers
Methods included from Equality
Constructor Details
#initialize(id, name) ⇒ Repository
Returns a new instance of Repository.
5 6 7 8 |
# File 'lib/docker/repository.rb', line 5 def initialize(id, name) @id = name @image_id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/docker/repository.rb', line 4 def id @id end |
#image_id ⇒ Object (readonly)
Returns the value of attribute image_id.
4 5 6 |
# File 'lib/docker/repository.rb', line 4 def image_id @image_id end |
Instance Method Details
#remove! ⇒ Object
10 11 12 |
# File 'lib/docker/repository.rb', line 10 def remove! `docker rmi #{id}` end |
#remove_image! ⇒ Object
14 15 16 |
# File 'lib/docker/repository.rb', line 14 def remove_image! `docker rmi -f #{image_id}` end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/docker/repository.rb', line 18 def to_s id end |