class PrawnHtml::Attributes

def merge_attr!(attributes, key, value)

Returns:
  • (Hash) - the updated hash of attributes

Parameters:
  • value () --
  • key (Symbol) -- key
  • attributes (Hash) -- target attributes hash
def merge_attr!(attributes, key, value)
  return unless key
  return (attributes[key] = value) unless Attributes::STYLES_MERGE.include?(key)
  attributes[key] ||= 0
  attributes[key] += value
end