Method: IsoDoc::Function::Utils#attr_code

Defined in:
lib/isodoc/function/utils.rb

#attr_code(attributes) ⇒ Object



36
37
38
39
40
41
# File 'lib/isodoc/function/utils.rb', line 36

def attr_code(attributes)
  attributes = attributes.reject { |_, val| val.nil? }.map
  attributes.map do |k, v|
    [k, (v.is_a? String) ? HTMLEntities.new.decode(v) : v]
  end.to_h
end