class Hash

Public Instance Methods

find_mesure(measure, tolerance) click to toggle source
# File lib/ruby_marks.rb, line 86
def find_mesure(measure, tolerance)
  ax = []
  each do |k, v|
    max = v.max { |a, b| a <=> b }
    min = v.min { |a, b| a <=> b }
    ax << [min, max] if max - min >= measure - tolerance && max - min <= measure + tolerance 
  end
  ax  
end