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.8.4 app/helpers/coco/format_helper.rb
coveragebook_components-0.8.3 app/helpers/coco/format_helper.rb
coveragebook_components-0.8.2 app/helpers/coco/format_helper.rb
coveragebook_components-0.8.1 app/helpers/coco/format_helper.rb
coveragebook_components-0.8.0 app/helpers/coco/format_helper.rb
coveragebook_components-0.8.0.beta.3 app/helpers/coco/format_helper.rb
coveragebook_components-0.8.0.beta.2 app/helpers/coco/format_helper.rb
coveragebook_components-0.8.0.beta.1 app/helpers/coco/format_helper.rb
coveragebook_components-0.7.10 app/helpers/coco/format_helper.rb
coveragebook_components-0.7.9 app/helpers/coco/format_helper.rb
coveragebook_components-0.7.8 app/helpers/coco/format_helper.rb
coveragebook_components-0.7.7 app/helpers/coco/format_helper.rb
coveragebook_components-0.7.6 app/helpers/coco/format_helper.rb
coveragebook_components-0.7.5 app/helpers/coco/format_helper.rb
coveragebook_components-0.7.4 app/helpers/coco/format_helper.rb
coveragebook_components-0.7.3 app/helpers/coco/format_helper.rb
coveragebook_components-0.7.2 app/helpers/coco/format_helper.rb
coveragebook_components-0.7.1 app/helpers/coco/format_helper.rb
coveragebook_components-0.7.0 app/helpers/coco/format_helper.rb
coveragebook_components-0.6.5 app/helpers/coco/format_helper.rb