Sha256: 75b164f617bfe608be7b20a7c996fd7e011ff4ebc0409dbab12455b17dffc60c

Contents?: true

Size: 243 Bytes

Versions: 73

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

73 entries across 73 versions & 1 rubygems

Version Path
coveragebook_components-0.6.4 app/helpers/coco/format_helper.rb
coveragebook_components-0.6.3 app/helpers/coco/format_helper.rb
coveragebook_components-0.6.2 app/helpers/coco/format_helper.rb
coveragebook_components-0.6.1 app/helpers/coco/format_helper.rb
coveragebook_components-0.6.0 app/helpers/coco/format_helper.rb
coveragebook_components-0.5.7 app/helpers/coco/format_helper.rb
coveragebook_components-0.5.6 app/helpers/coco/format_helper.rb
coveragebook_components-0.5.5 app/helpers/coco/format_helper.rb
coveragebook_components-0.5.4 app/helpers/coco/format_helper.rb
coveragebook_components-0.5.3 app/helpers/coco/format_helper.rb
coveragebook_components-0.5.2 app/helpers/coco/format_helper.rb
coveragebook_components-0.5.1 app/helpers/coco/format_helper.rb
coveragebook_components-0.5.0 app/helpers/coco/format_helper.rb