Method: MiniHistogram#initialize

Defined in:
lib/mini_histogram.rb

#initialize(array, left_p: true, edges: nil) ⇒ MiniHistogram

Returns a new instance of MiniHistogram.



24
25
26
27
28
29
30
31
# File 'lib/mini_histogram.rb', line 24

def initialize(array, left_p: true, edges: nil)
  @array = array
  @left_p = left_p
  @edges = edges
  @weights = nil

  @min, @max = array.minmax
end