Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/plantwatchdog/aggregation_methods.rb

Instance Method Summary collapse

Instance Method Details

#each_priorObject



19
20
21
22
23
24
25
26
27
# File 'lib/plantwatchdog/aggregation_methods.rb', line 19

def each_prior()
  i=0
  result=[]
  while (i < self.size-1) do
    result << yield(self[i],self[i+1])
    i+=1
  end
  return result
end