# File lib/scruffy/layers/pie.rb, line 57 def initialize(options = {}, &block) super(options) # Allow for population of data with a block during initialization. if block block.call(self) else # Otherwise, just iterate over the points, adding the slices if @points.class == Hash @points.keys.each {|k| self.add :pie_slice, k.to_s, [@points[k]]} end if @points.class == Array @points.each {|v| self.add :pie_slice, '', [v]} end end end