Sha256: 75b164f617bfe608be7b20a7c996fd7e011ff4ebc0409dbab12455b17dffc60c

Contents?: true

Size: 243 Bytes

Versions: 74

Compression:

Stored size: 243 Bytes

Contents

module Coco
  module FormatHelper
    # Ensures a hex color has a `#` prefix
    # for use in CSS style values
    def format_css_hex_color(color)
      if color.present?
        "#" + color.to_s.delete_prefix("#")
      end
    end
  end
end

Version data entries

74 entries across 74 versions & 1 rubygems

Version Path
coveragebook_components-0.19.9 app/helpers/coco/format_helper.rb
coveragebook_components-0.19.8 app/helpers/coco/format_helper.rb
coveragebook_components-0.19.7 app/helpers/coco/format_helper.rb
coveragebook_components-0.19.6 app/helpers/coco/format_helper.rb
coveragebook_components-0.19.5 app/helpers/coco/format_helper.rb
coveragebook_components-0.19.4 app/helpers/coco/format_helper.rb
coveragebook_components-0.19.3 app/helpers/coco/format_helper.rb
coveragebook_components-0.19.2 app/helpers/coco/format_helper.rb
coveragebook_components-0.19.1 app/helpers/coco/format_helper.rb
coveragebook_components-0.19.0 app/helpers/coco/format_helper.rb
coveragebook_components-0.18.8 app/helpers/coco/format_helper.rb
coveragebook_components-0.18.7 app/helpers/coco/format_helper.rb
coveragebook_components-0.18.0 app/helpers/coco/format_helper.rb
coveragebook_components-0.17.7 app/helpers/coco/format_helper.rb
coveragebook_components-0.17.6 app/helpers/coco/format_helper.rb
coveragebook_components-0.17.5 app/helpers/coco/format_helper.rb
coveragebook_components-0.17.4 app/helpers/coco/format_helper.rb
coveragebook_components-0.17.3 app/helpers/coco/format_helper.rb
coveragebook_components-0.17.2 app/helpers/coco/format_helper.rb
coveragebook_components-0.17.1 app/helpers/coco/format_helper.rb