# File lib/SVG/Graph/DataPoint.rb, line 11 def DataPoint.configure_shape_criteria(*matchers) CRITERIA.push(*matchers) end
# File lib/SVG/Graph/DataPoint.rb, line 23 def shape(description=nil) shapes = CRITERIA.select {|criteria| criteria.size == 2 }.collect {|regexp, proc| proc.call(@x, @y, @line) if description =~ regexp }.compact shapes = [DEFAULT_SHAPE.call(@x, @y, @line)] if shapes.empty? overlays = CRITERIA.select { |criteria| criteria.last == OVERLAY }.collect { |regexp, proc| proc.call(@x, @y, @line) if description =~ regexp }.compact return shapes + overlays end
Generated with the Darkfish Rdoc Generator 2.