Sha256: f5f0d49e3cd1fc0044ae75f1a9ae77a915b321923e917c23f4446d8086ec7f1a

Contents?: true

Size: 424 Bytes

Versions: 3

Compression:

Stored size: 424 Bytes

Contents

module Suricate
  class ChartSerieBuilder
    def initialize
      @values = []
    end

    def name(name)
      @name = name
    end

    def color(color)
      @color = color
    end

    # Add multiple values
    def values(values)
      @values.concat(values)
    end

    # Add one value
    def value(value)
      @values << value
    end

    def serie
      ChartSerie.new(@name, @values, @color)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
suricate-0.0.4 lib/suricate/charts/chart_serie_builder.rb
suricate-0.0.3 lib/suricate/charts/chart_serie_builder.rb
suricate-0.0.2 lib/suricate/charts/chart_serie_builder.rb