class Phlex::SGML
def __classes__(c)
- Api: - private
def __classes__(c) case c when String c when Symbol c.name.tr("_", "-") when Array, Set c.filter_map { |c| __classes__(c) }.join(" ") when Hash c.filter_map { |c, add| next unless add case c when String then c when Symbol then c.name.tr("_", "-").delete_suffix("?") else raise Phlex::ArgumentError.new("Class keys should be Strings or Symbols.") end }.join(" ") when nil, false nil else if c.respond_to?(:to_phlex_attribute_value) c.to_phlex_attribute_value elsif c.respond_to?(:to_str) c.to_str else c.to_s end end end