Array
# File lib/fog/ecloud/mock_data_classes.rb, line 550 def <<(disk) next_address = 0 disk_with_max_address = max {|a, b| a[:address] <=> b[:address] } disk_with_max_address && next_address = disk_with_max_address.address + 1 disk[:address] ||= next_address super(disk) if (addresses = map {|d| d.address }).uniq.size != size raise "Duplicate disk address in: #{addresses.inspect} (#{size})" end sort! {|a, b| a.address <=> b.address } self end
Generated with the Darkfish Rdoc Generator 2.