module Haml::AttributeBuilder
def build_data_keys(data_hash, hyphenate, attr_name="data")
def build_data_keys(data_hash, hyphenate, attr_name="data") Hash[data_hash.map do |name, value| if name == nil [attr_name, value] elsif hyphenate ["#{attr_name}-#{name.to_s.tr('_', '-')}", value] else ["#{attr_name}-#{name}", value] end end] end