class Haml::AttributeCompiler

def compile_attribute(key, values)

Returns:
  • (Array) - Temple expression

Parameters:
  • values (Array) --
  • key (String) --
def compile_attribute(key, values)
  if values.all? { |v| Temple::StaticAnalyzer.static?(attr_literal(v)) }
    return static_build(values)
  end
  case key
  when 'id', 'class'
    compile_id_or_class_attribute(key, values)
  else
    compile_common_attribute(key, values)
  end
end