class Haml::Compiler

def self.build_data_keys(data_hash, hyphenate)

def self.build_data_keys(data_hash, hyphenate)
  Hash[data_hash.map do |name, value|
    if name == nil
      ["data", value]
    elsif hyphenate
      ["data-#{name.to_s.gsub(/_/, '-')}", value]
    else
      ["data-#{name}", value]
    end
  end]
end