Sha256: 688a276d4142c6e9aa521636aea8c371a3c970334b2aa402589a6d9c50215ce1

Contents?: true

Size: 468 Bytes

Versions: 1

Compression:

Stored size: 468 Bytes

Contents

module PiCharts

  class Utils

    def cdn(args={})
      version = args[:version] || "2.4.0"
      min     = false          || args[:min]
      if min
        "<script src=\"https://cdnjs.cloudflare.com/ajax/libs/Chart.js/#{version}/Chart.min.js\"></script>"
      else
        "<script src=\"https://cdnjs.cloudflare.com/ajax/libs/Chart.js/#{version}/Chart.js\"></script>"
      end
    end

    def random_color
      "##{SecureRandom.hex(3)}"
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pi_charts-1.0.0 lib/pi_charts/utils.rb