Sha256: b7210ec574e4097646dca42b4bf8ff431bacd46bde5756c7f1e1786b0890a96b

Contents?: true

Size: 340 Bytes

Versions: 4

Compression:

Stored size: 340 Bytes

Contents

# frozen_string_literal: true

module Primer
  # :nodoc:
  module JoinStyleArgumentsHelper
    # Join two `style` arguments
    #
    # join_style_arguments("width: 100%", "height: 100%") =>
    #   "width: 100%;height: 100%"
    def join_style_arguments(*args)
      args.compact.map { |a| a.strip.chomp(";") }.join(";")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
primer_view_components-0.0.89 app/lib/primer/join_style_arguments_helper.rb
primer_view_components-0.0.88 app/lib/primer/join_style_arguments_helper.rb
primer_view_components-0.0.87 app/lib/primer/join_style_arguments_helper.rb
primer_view_components-0.0.86 app/lib/primer/join_style_arguments_helper.rb