Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/montecasting/hash.rb

Instance Method Summary collapse

Instance Method Details

#to_chartObject



2
3
4
5
6
# File 'lib/montecasting/hash.rb', line 2

def to_chart
  result = Array.new
  each {|key, value| result << {x: key, y: yield(value)}  }
  result
end