class Haml::Compiler
def self.build_data_keys(data_hash, hyphenate, attr_name="data")
def self.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.gsub(/_/, '-')}", value] else ["#{attr_name}-#{name}", value] end end] end