Module: Docker::Equality

Included in:
Container, Image
Defined in:
lib/docker/equality.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



3
4
5
6
7
8
# File 'lib/docker/equality.rb', line 3

def ==(other)
  # this seems unconfident, but it is because I want to be able
  # to create containers with shortened ID's (for now)
  min = [id.length, other.id.length].min
  id[0...min] == other.id[0...min] 
end